Disable tenant ownership relation
In a Jetstream based app we're using the Teams setup. In our app however, not all models are strictly separated per team. Some models are always available for all teams, some are filtered if they are associated to at least one team, and others are always associated to teams.
In Filament v2, we already implemented the teams by applying global scopes on models which should vary per team. Relation managers then handle the associations between teams where required, else the create / edit pages ensure (new) models are synced to the correct team.
As we couldn't switch between the active team from Filament before (and only through the Jetstream front-end), we currently didn't have a team switcher.
After upgrading to Filament v3 after all third party packages have been updated, I checked out the tenancy docs to see if we could hook in onto the new Multi-tenancy setup.
Tenancy worked straight out of the box by implementing the interface and adding the methods from the docs:
However, on every resource I'm now getting the following error:
Is it possible to disable this relation behavior since we're using a morphToMany? If so, we could use the first party Tenancy setup to switch the current tenant/team in Filament, while keeping our own custom business logic in place.
In Filament v2, we already implemented the teams by applying global scopes on models which should vary per team. Relation managers then handle the associations between teams where required, else the create / edit pages ensure (new) models are synced to the correct team.
As we couldn't switch between the active team from Filament before (and only through the Jetstream front-end), we currently didn't have a team switcher.
After upgrading to Filament v3 after all third party packages have been updated, I checked out the tenancy docs to see if we could hook in onto the new Multi-tenancy setup.
Tenancy worked straight out of the box by implementing the interface and adding the methods from the docs:
However, on every resource I'm now getting the following error:
Is it possible to disable this relation behavior since we're using a morphToMany? If so, we could use the first party Tenancy setup to switch the current tenant/team in Filament, while keeping our own custom business logic in place.