Multi tenancy with multiple database with stancl/tenancy package
Hi,
I'm developing a Saas with multi tenancy with multiple database(one tenant->one database) using the package stancl/tenancy.
Also have two panels, one for the administration for the tenants and the other for the users of the tenants.
Everything seems well, but when i try to login with the Tenan Panel and the user register for that tenant i can not login 'cause it says "These credentials do not match our records.".
How can i configure Filament to accept the config database of the tenant?, in this case identify the tenant by its domain:
foo.localhost
bar.localhost
And the Administration tenant is:
central.localhost
Note: when i try to login with the user of the Admin Panel with the Tenant Panel it throws an error of bad method call getTenants() but if i return to the Admin Panel it shows the dashboard.
![No description](https://cdn.answeroverflow.com/1220503119239319702/image.png)
![No description](https://cdn.answeroverflow.com/1220503119520206899/image.png)
6 Replies
@Chris Lopez Did you get this working?
Hi, Kmerrio
Till today i cant get this work
The error is telling you that there is no getTenant() method on your user model.
Hello, I don't think you've followed the documentation correctly, here's the link : https://filamentphp.com/docs/3.x/panels/tenancy#setting-up-tenancy
You can also work with domain : https://filamentphp.com/docs/3.x/panels/tenancy#using-a-domain-to-identify-the-tenant
Thnx, i will check it out, i supposed i forgot something of configuration
do i have to configure the Tenan model cause it throws me this it executes in the FilamentManager -> getUserTenants. It seems that doesnt suppor that package to maker database per tenant.
![No description](https://cdn.answeroverflow.com/1233470013764010025/image.png)