Nested relationships
Hi, I am working on a client project which has a few nested relationships. E.g.
Season Group
contains 0 ... n Seasons
, ReductionGroup
contains 0...n Reductions
. I am not sure how to implement this with Filament.
I am aware that I could add a relation manager for seasonGroups
and for seasons
, I also assume that there could be a better way.8 Replies
not enough context. are you having issues with tables or forms and in what way? There are different approaches for different needs. Unfortunately not just a silver bullet. A tip though is that you can set a relationship on a Group in a form schema and with that Group, have a nested relationship field or group of fields, etc. Can even do it on a fieldset or anyhting i think. Groups are just useful if you dont need an actual layout change, etc
I've got a form like that. I'd like to add seasons to "Saisongruppe A" on the bottom of the page without adding a separated relational manager because I got a few of these relations and it would be kinda overheady.
how would you prefer them to look? You can create your own components
ist just livewire
I think this is on the todo list https://github.com/filamentphp/filament/issues/7104
nice, thank you
is it though? I thought it was just a place to discuss it
its just something proposed
The way I do it so far is that I create a resource for the second level of nesting and then to it a relation-manager that handles level 3. From the second level, just refer to the next nesting using ->url on any of the columns. On the last level, it's still a good idea to make a [return] button that will take you back to level 2.
I guess that's what I'm gonna do
Maybe I'll dive into customization at this point, not sure yet
I used
Repeater
to solve my problem.