Replies: 3 comments 1 reply
-
Hi. My tests showed that the application connects to the database from the default configuration (.env), not to the landlord database. A similar problem was described here #439 . My temporary solution based on comments from that discussion is: (for example in AppServiceProvider)
|
Beta Was this translation helpful? Give feedback.
-
My approach is similar. But rather than using the AppServiceProvider I have rewritten the Spatie's Database Task, making it slightly more the Spatie's way. In your config/multitenancy.php update this -
Then create the SwitchTenantDatabaseTask -
|
Beta Was this translation helpful? Give feedback.
-
Any package assumes that its models use the default connection: it happens with Sanctum, Fortify, Spatie Medialibrary... all packages. Using a package like For example, how
|
Beta Was this translation helpful? Give feedback.
-
Hi
I'm trying to create a multi tenancy app, I have Jetstream and Fortify to handle login, registration etc.
On getting it working and a tenancy databse setup with standard migrations users, migrations, sessions tables etc.
When I try to register on the tenent site it is reading trying to register on the landlord DB rather than the Tenants DB,
what steps do i need to take to get the user to register on the tenants DB rather than attemping to register on the landlord DB??
I've googled to no avial, I'm assuming someone has done this at some point...
Any help much appreciated...
Beta Was this translation helpful? Give feedback.
All reactions