Multi-tenancy panel giving 404
I have followed the instructions for setting up multi-tenancy on https://filamentphp.com/docs/3.x/panels/tenancy
The tenant class is extending
JetstreamTeam
, and the tenant registration page and profile page are created from the docs.
When I login and register a team, the team is successfully created but when it redirects to /admin/{new_team_id}
it results in a 404?Solution:Jump to solution
Okay, I solved the problem. It was an issue with the
canAccessTenant
function on the User
model, required by the HasTenants
interface. It was only checking the teams (i.e. many to many), not the owned teams (this is a Jetstream feature)2 Replies
I've also just confirmed the routes:
The url should be found... I really don't understand where the 404 is coming from?
Solution
Okay, I solved the problem. It was an issue with the
canAccessTenant
function on the User
model, required by the HasTenants
interface. It was only checking the teams (i.e. many to many), not the owned teams (this is a Jetstream feature)