How to create and edit multi-site content in Filament 3?

Hi all! I'm migrating an existing database to Filament, and I run into tables the have (among others) an id, a parentId and a siteId column. Right now, when a user opens one of the rows in the table in the admin, a form is shown for that parentId, with tabs for all siteIds. Is this something that can be replicated in Filament?
4 Replies
krekas
krekas5mo ago
what do you mean by opens one of the rows? open view page? edit page?
paul_verheul
paul_verheulOP5mo ago
Sorry, that was not clear ... I mean, they open the edit page for that row, but should also be able to edit the corresponding rows (for other sites), having the same parentId. Upon saving, the rows for all sites should be saved.
krekas
krekas5mo ago
Use observer to update other fields? It's still not very clear what you want for me
tim.lalev
tim.lalev5mo ago
"siteId" and "parentId" are just foreign keys for model relationships. You can use custom forms however necessary to interact with models in Filament. If all sites pull content from that central database then editing the content is just standard CRUD operations Otherwise additional logic will be necessary for syndication. That logic may be put in an observer, or even custom Filament Action
Want results from more Discord servers?
Add your server