draw134
draw134

Reputation: 1187

Tenancy for laravel - Not detecting the tenants database

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!

Upvotes: 2

Views: 1717

Answers (1)

VDTe
VDTe

Reputation: 645

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

Upvotes: 4

Related Questions