F
Filament10mo ago
Sanjana

help

->afterStateHydrated(function (Component $component) { $postModel = new PostMedia(); $postId = $component->getModel(); // dump($postId); // $post = $postModel->find($postId); // $images = $post->getPosts(); // return $component->state([ // 'content_url' => $images, // ]); }) i have this method and i have to get the corrent post id on view . how do i get
2 Replies
toeknee
toeknee10mo ago
->afterStateHydrated(function (Component $component, PostMedia $record) { $postModel = new PostMedia(); $postId = $component->getModel(); // dump($postId); // $post = $postModel->find($postId); // $images = $post->getPosts(); // return $component->state([ // 'content_url' => $images, // ]); }) i have this method and i have to get the corrent post id on view . how do i get Then use $record->id if I understand you correctly.
Want results from more Discord servers?
Add your server