mirror of
https://github.com/archtechx/tenancy.git
synced 2025-12-14 06:04:03 +00:00
Refactor DB config & Tenant DB managers
This commit is contained in:
parent
3c4d2189dc
commit
64383b4c56
8 changed files with 51 additions and 41 deletions
|
|
@ -54,4 +54,11 @@ class MySQLDatabaseManager implements TenantDatabaseManager, CanSetConnection
|
|||
{
|
||||
return (bool) $this->database()->select("SELECT SCHEMA_NAME FROM INFORMATION_SCHEMA.SCHEMATA WHERE SCHEMA_NAME = '$name'");
|
||||
}
|
||||
|
||||
public function makeConnectionConfig(array $baseConfig, string $databaseName): array
|
||||
{
|
||||
$baseConfig['database'] = $databaseName;
|
||||
|
||||
return $baseConfig;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue