Creating custom livewire action Componente using relationships
Hey guys.
I'm trying to create a Livewire component that will return an Action where I'm using to fill a multi-select with tag options.
It works perfectly when I'm using this action directly on my resource, using headerFunction from View page, but using a custom livewire component doesn't work. Taking a look I imagine that is something related with relationships.
Blade:
Component:
I'm trying to create a Livewire component that will return an Action where I'm using to fill a multi-select with tag options.
It works perfectly when I'm using this action directly on my resource, using headerFunction from View page, but using a custom livewire component doesn't work. Taking a look I imagine that is something related with relationships.
Blade:
<livewire:manage-tag-action :model="$client"/>Component:
Solution
You need to provide your model to the action. Probably
->record(fn ($livewire) => $livewire->model) or similar