1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2025-12-12 23:34:03 +00:00

Bootstrapper tests

This commit is contained in:
Samuel Štancl 2020-05-11 03:37:47 +02:00
parent 73fc525126
commit 6f4b9f486c
20 changed files with 266 additions and 79 deletions

View file

@ -93,7 +93,7 @@ class DatabaseConfig
{
return $this->tenant->getInternal('db_connection')
?? config('tenancy.template_tenant_connection')
?? DatabaseManager::$originalDefaultConnectionName;
?? config('tenancy.central_connection');
}
/**
@ -105,6 +105,7 @@ class DatabaseConfig
$templateConnection = config("database.connections.{$template}");
// todo move a lot of this logic to the tenant DB manager so that we dont have to deal with the separators & modifying DB names here
$databaseName = $this->getName();
if (($manager = $this->manager()) instanceof ModifiesDatabaseNameForConnection) {
/** @var ModifiesDatabaseNameForConnection $manager */