Multitenant / multisite questions #2171
Replies: 4 comments
-
|
Hi @undersound! Quick answers for now:
|
Beta Was this translation helpful? Give feedback.
-
|
Thanks @ifox
|
Beta Was this translation helpful? Give feedback.
-
|
Not really my initial idea, but I will explain statement 1. This is simple since you plan to use a multi-tenant setup with different databases per subdomain. Per that, content saved on website1 will only be shown on website1 since it will load DB connection1 (statement 2) via middleware. Note: when making migrations, you will also need to migrate on different connections, since Laravel migrates only on default connection when using What about auth, do managers/admins share the auth between subdomains or they will have separate authentication? |
Beta Was this translation helpful? Give feedback.
-
|
Thanks @kallefrombosnia In a multi database setup the content is ofcourse automatically seperated. I was curious though how content would be seperated in a single database setup by leveraging the twill 3 permissions management system if at all possible. I just did a test with https://github.com/spatie/laravel-multitenancy in combination with Twill and it is working quite well at first glance. Database switching is determined by Spatie\Multitenancy\TenantFinder\DomainTenantFinder. There is also an artisan command which runs on all tenants. E.g. This reads all rows from the tenants table in the landlord database. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Couple of questions regarding multi-tenancy:
Any examples or guidance is greatly appreciated
Beta Was this translation helpful? Give feedback.
All reactions