Passing data to custom page through table action.
Hi, I'm trying to pass the current record to a custom page on a table action, however I can't seem to get the data. Here's my setup:
Layer resource, table actions:
Draw custom page blade view:
Error: .
I can't find much on the docs. Any clues as to what might be going wrong?
10 Replies
Add
$record
as a public property to your pageAlready tried that! Comes however I declared it (so either null or an empty array or however I declare it), without the actual record
Dump:
Tried
$this->record
?Same output :/
Can you share the code for your page?
It's what was generated by the filament make page command:
I thought that should be enough. But maybe it was another component. This should work:
Actually this should be enough:
You need to type hint it.
Great!! Type hinting worked, thanks!
Having same issue:
I'm trying to pass data from a filament resource using custom action:
ActionsAction::make('view')
->label('Details')
->url(fn (MyQuizzes $record): string => route('filament.member.pages.quiz-detail-page', $record)),
The data I want to deliver is to a custom livewire component within custom page:
Custom Page view:
<x-filament-panels::page>
<livewire:QuizDetailPage/>
</x-filament-panels::page>
Any help in the right direction would be highly apprecated!