How to pass data to an EditAction
I'm struggling to make the editAction to recieve the record where I call the action in the livewire blade component
In blade i have :
{{ ($this->editAction)(['record' => $menu]) }}
component:
Do i need anything in the mount() ?
(I have a similar createAction in the compoenent that's working fine
)8 Replies
Maybe livewire ownerRecord?
It's complaining that the $record is null.
is this the correct way to pass that to the action?
{{ ($this->editAction)(['record' => $menu]) }}
or is there any other way maybe with wire:click
Record would be null, that's why I suggest livewire ownerRecord which should be where it comes from
Property [$ownerRecord] not found on component: [menu-component]
Do you know somewhere it shows how to passs data from the compoenent to the form of that Modal? ;Can you provide the whole menu component?
for a better context this is what i'm trying to do:
I want to open a modal when clicking that pencil and send that record
The createAction is workign fine btw
So you want to call $this->butteryMenu then instead of livewire/owner record?