1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2026-02-05 18:14:04 +00:00

Merge branch 'master' of https://github.com/archtechx/tenancy into stein-j-readied-tenant

This commit is contained in:
lukinovec 2022-10-20 14:09:32 +02:00
commit e172408576
28 changed files with 409 additions and 117 deletions

View file

@ -58,6 +58,8 @@ class TenancyServiceProvider extends ServiceProvider
return $event->tenant;
})->shouldBeQueued(false), // `false` by default, but you probably want to make this `true` for production.
],
Events\TenantMaintenanceModeEnabled::class => [],
Events\TenantMaintenanceModeDisabled::class => [],
// Pending tenant events
Events\CreatingPendingTenant::class => [],

View file

@ -2,16 +2,14 @@
declare(strict_types=1);
use Stancl\Tenancy\Database\Models\Domain;
use Stancl\Tenancy\Database\Models\Tenant;
use Stancl\Tenancy\Middleware;
use Stancl\Tenancy\Resolvers;
return [
'tenant_model' => Tenant::class,
'id_generator' => Stancl\Tenancy\UUIDGenerator::class,
'tenant_model' => Stancl\Tenancy\Database\Models\Tenant::class,
'domain_model' => Stancl\Tenancy\Database\Models\Domain::class,
'domain_model' => Domain::class,
'id_generator' => Stancl\Tenancy\UUIDGenerator::class,
/**
* The list of domains hosting your central app.
@ -135,18 +133,21 @@ return [
'pgsql' => Stancl\Tenancy\Database\TenantDatabaseManagers\PostgreSQLDatabaseManager::class,
'sqlsrv' => Stancl\Tenancy\Database\TenantDatabaseManagers\MicrosoftSQLDatabaseManager::class,
/**
* Use this database manager for MySQL to have a DB user created for each tenant database.
* You can customize the grants given to these users by changing the $grants property.
*/
/**
* Use this database manager for MySQL to have a DB user created for each tenant database.
* You can customize the grants given to these users by changing the $grants property.
*/
// 'mysql' => Stancl\Tenancy\Database\TenantDatabaseManagers\PermissionControlledMySQLDatabaseManager::class,
/**
* Disable the pgsql manager above, and enable the one below if you
* want to separate tenant DBs by schemas rather than databases.
*/
/**
* Disable the pgsql manager above, and enable the one below if you
* want to separate tenant DBs by schemas rather than databases.
*/
// 'pgsql' => Stancl\Tenancy\Database\TenantDatabaseManagers\PostgreSQLSchemaManager::class, // Separate by schema instead of database
],
// todo docblock
'drop_tenant_databases_on_migrate_fresh' => false,
],
/**