Define multi-tenant relationship indirectly through another model
Hello,
I'm working with Filament's multi-tenancy features and I have a question about defining tenant ownership relationships.
In my app:
- A User belongs to a Team (with a team_id column).
- A Post belongs to a User (with a user_id column).
- A Post does not have a team_id column directly.
I would like Filament to treat a Post as belonging to a Team, but indirectly via its related User.
Is it possible to define the ownership relationship in this way, without adding a direct team_id column to the posts table?
I would define something like this, in the Post model:
Thanks for your help!
0 Replies