Call the "edit" modal for a record in a resource from a different page
Hi everyone. I have a "Reservation" Resource (and Model) that I use in a custom Livewire component to create a custom reservation calendar for a restaurant (Image attached). I'd like to be able to call the edit modal when I click on a reservation in the calendar, but I can't find the right way.
Thank you
- This link taught me about the mountable actions : - https://github.com/filamentphp/filament/blob/3.x/packages/actions/docs/06-adding-an-action-to-a-livewire-component.md
- A few other searches here on discord taught me about the necessity to have a form but I can't seem to get the form schema directly from my resource ;
- I already have the
<x-filament-actions::modals />call in my livewire component ; - I've searched and searched the github repo directly but searches get messy as they return help pages and tests, sometimes in contexts using the same nomenclature ("mountAction" for example).
Thank you

Solution
To anyone looking for a possible way to do this, I managed to do it by inferring code from @awcodes' "Quick Create" plugin :
1 / In your custom Livewire component add uses :
2 / When you mount the component, bind the actions (here through a
1 / In your custom Livewire component add uses :
2 / When you mount the component, bind the actions (here through a
getActions() method which calls a getModelInstance() to pass the ID in the blade view :
