dd($record) always returns the first record, no matter which one I select
Hi everyone π
I'm having a strange issue in my Filament admin panel.
When I try to dump the selected record inside a table action using dd($record), it always returns the first record of the table β no matter which record I actually click on.
Here's what I'm doing:
But it always dumps the same record (the first one).
2 Replies
Sounds like you might be trying to create a bulk action β in that case, you should use the BulkAction class instead of Action.
Docs:
v4 β https://filamentphp.com/docs/4.x/tables/actions#bulk-actions
v3 β https://filamentphp.com/docs/3.x/tables/actions#bulk-actions
Or are you really talking about record actions?
I just thought that because you mentioned selected records.