DatabaseManager
class DatabaseManager (View source)
internal | Class is subject to breaking changes in minor and patch versions. |
Properties
protected Application | $app | ||
protected DatabaseManager | $database | ||
protected Repository | $config |
Methods
__construct(Application $app, DatabaseManager $database, Repository $config)
No description
reconnectToCentral()
Reconnect to the default non-tenant connection.
setDefaultConnection(string $connection)
Change the default database connection config.
purgeTenantConnection()
Purge the tenant database connection.
void
Details
__construct(Application $app, DatabaseManager $database, Repository $config)
No description
connectToTenant(TenantWithDatabase $tenant)
Connect to a tenant's database.
reconnectToCentral()
Reconnect to the default non-tenant connection.
setDefaultConnection(string $connection)
Change the default database connection config.
createTenantConnection(TenantWithDatabase $tenant)
Create the tenant database connection.
purgeTenantConnection()
Purge the tenant database connection.
void
ensureTenantCanBeCreated(TenantWithDatabase $tenant)
Check if a tenant can be created.