Utility Injection on action method not working
does utility injection work on Action's action method?
when I try
Action::icon('some-icon')->action(function (Livewire $livewire, $state) {
I get the following error
6 Replies
Solution
Should be ‘Component’ not ‘Livewire’. You’re using the wrong class.
i was trying to access the Livewire instance
i see the import on that example, thank you
You are doing it right you’re just injecting the wrong class. 🙂
thank you. Would you mind if I DM you? Got to get some opinion on something I have been working on.
Sure. Fair warning my brain doesn’t want to work today. Lol.