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:
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)
Jump to solution
2 Replies
VortexTrumpetHat
VortexTrumpetHatOP11mo ago
I've also just confirmed the routes:
GET|HEAD admin/{tenant} ... filament.admin.pages.dashboard › App\Filament\Pages\Dashboard
GET|HEAD admin/{tenant} ... filament.admin.pages.dashboard › App\Filament\Pages\Dashboard
The url should be found... I really don't understand where the 404 is coming from?
Solution
VortexTrumpetHat
VortexTrumpetHat11mo ago
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)
Want results from more Discord servers?
Add your server