DownloadSymfony Multi-tenant Example
This is a simple example of a multi-tenant application using Symfony 6.2
Installation
-
Clone the repository
-
Run `composer install`
-
Update hostname in `.env`
-
Run `bin/console doctrine:database:create`
-
Run `bin/console doctrine:migrations:migrate`
Create a new tenant
-
Run `bin/console app:tenant-create` to create a new tenant
-
Run `bin/console app:tenant-migrate {tenantId}` to run migrations for a tenant
-
Run `bin/console app:tenant-create-user {tenantId}` to create a new user for a tenant
-
Run `bin/console app:tenant-maintenance {tenantId} {mode}` to enable or disable maintenance mode for a tenant
Todo
-
[ ] Add tenant events
-
[ ] Add tests
|