Problem implementing stancl/tenancy with Filament 4
I’ve been trying for days but I can’t get multitenancy to work.
I’ve installed Stancl, and I’m at the point where I can create tenants from the backend with a dedicated database and admin user.
But I have a login issue:
If I visit a URL like tenant1.mysite.ddev.site/login or tenant2.mysite.ddev.site (these are two existing tenants), I see the login screen, but when I try to log in I get:
“This page has expired. Would you like to refresh the page?”
Also, if I visit tenant3.mysite.ddev.site (this tenant doesn’t exist), I still see the login screen!
The admin panel login at mysite.ddev.site/admin works fine.
But if I visit tenant1.mysite.ddev.site/admin it lets me log in to the admin panel (!!), even if I visit tenant3.mysite.ddev.site/admin (which doesn’t exist)...
2 Replies
TenantPanelProvider.php
route/tenant.php
bootstrap/providers.php
I have never used stancl/tenancy, but I use spatie/multitenancy without any issues very often