Possible bug in communication with livewire while passing data through dispatch?
I'm trying to dispatch event and provide an array with keys and values as data in notification action.
This is where I'm setting up the action:
If I do it like this, I get this error:
Unable to resolve dependency [Parameter #0 [ <required> $data ]] in class ...
But if I put the data array into another array like this:
Then I get it correctly, verified with debug (see the image).
I think this might be some kind of mistake, but correct me if I'm wrong, or doing something wrong please.Solution:Jump to solution
I think it should be
public function handleChoosePerson($similarPerson, $newPerson)
.8 Replies
Does anyone know?
Solution
I think it should be
public function handleChoosePerson($similarPerson, $newPerson)
.oh okay, thank you, I didn't know it could be done like that...
So it did work? π
Yeah, at first I didn't understand correctly
Livewire uses each item as an argument
what you've ment
sorry
I though you were talking about something else
my bad
Thank you!
No worries. Good you noticed