Running action throws "using $this when not in object context"
I'm working in the table of a standard Filament resource.
The documentation says I can do this: https://filamentphp.com/docs/3.x/tables/columns/getting-started#action-modals
So I did:
But when I click that icon, I get:
Seems odd they would put something in the docs that doesn't work, but maybe it's not intended for regular resource tables? I can't remove static from the table function here.
I wouldn't even mind that the docs gave me erroneous code, if I could find a workaround, which I can't. What should I do?
Solution:Jump to solution
->action(function (Post $record, Page $livewire)...
then, use $livewire->dispatch(..
...1 Reply
Solution
->action(function (Post $record, Page $livewire)...
then, use $livewire->dispatch(..