I'm working on a sport project using Laravel 11 and Filament 3.
In the app we have Seasons, each season can have many Competitions, each competition can have many Divisions, and each division has many fixtures (matches). The DB schema is normalised so the fixtures table only has a division_id FK, the divisions table has a competion_id FK, and finally the competitions table as a season_id FK.
I want to display the fixtures, but I need to be able to filter by season, competition and division.
I was able to add three select filter, one for the season, one for the competition, and one for division, but the issue is that the options for the compeition select must be refreshed once the user chooses a season. Similarly, the options for the division select must be refrshed one the user chooses a competition. And finally, the data shown must be refreshed once the user chooses the division.
This is the part I cannot work-out, this hirearchy and reactivity. I was able to set the initial state of defaulting to one the most recent season, with that load the appropriate competitions and select the first one, then loading the appropriate divisions and select the first one, and finally loading the appropriate fixtures. But after that, if I select something else, for example a different competition, I don't know how to refresh the data, for example the possible divisions.
I have even tried to create a de-normalised view, but that didn't help.
Does anybody have any suggestions or hints to help me out