FilamentF
Filament3y ago
Jo

Having a relation manager under the edit form in a modal of a relation manager

I have a model which is called ServicePeriod which hasMany of another model called Slot. I have set up the relation manager successfully, so if I go to the edit screen of ServicePeriodI can see all of the related Slot records in a list with edit and delete buttons, and I can click on them to get an edit form which appears in a modal. All good so far.

But each Slot also hasMany of another model called Sector and I want a list of all of the Sector records which are related to the Slot record to be displayed under the Slot edit form within the modal. Preferably I would like this to be the same style as the relation manager. I've obviously set up the getRelations() inside the SlotResource properly, but it isn't automatically showing under the edit form in the modal as it would do on a normal resource page.

Is this possible, or am I going beyond what it's supposed to do?
Was this page helpful?