Home > Enterprise >  Tenancy for laravel - Not detecting the tenants database
Tenancy for laravel - Not detecting the tenants database

Time:11-18

I am using this package https://tenancyforlaravel.com/ and I already setup one test tenant tenant1. When I login to its domain tenant1.localhost:8000/login, it says

SQLSTATE[42S02]: Base table or view not found: 1146 Table 'academymanager.users' doesn't exist

I think it didn't detect the tenants database since its using my main database. My main db is academymanager and the tenants db is academymanager_tenant1. Does naming convention affects it?

Thanks in advance!

CodePudding user response:

I'm sure you are using laravel fortify. If you do just add this InitializeTenancyByDomain::class into the fortify config middleware

  • Related