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:
class MenuComponent extends Component implements HasForms
public function editAction(): Action
{
return
Action::make('edit')
->fillForm(fn(ButteryMenu $record): array => [
'title' => $record->title,
...
])
->form(ButteryMenuResource::getFormSchema())
->action(function (array $data, array $arguments): void {
$record = ButteryMenu::find($arguments['record']->id);
$record->update($data);
$this->dispatch('buttery-menu-saved');
});
}
Do i need anything in the mount() ?
(I have a similar createAction in the compoenent that's working fine
)