Dynamic toggle columns based on relationship
So, I have this model Product, which links to ProductCountry (which is also linked to a Country)
In my Product-table I would like to have a column for every Country with a toggle-button which indicates whether that product is enabled for that country.
When clicking the toggle-button, it should either add the ProductCountry-record to the database, or delete it.
How would I make this possible in Filamentphp?
4 Replies