mirror of
https://github.com/archtechx/tenancy.git
synced 2025-12-12 15:54:03 +00:00
add public connection() method to the Tenant DB manager interface
This commit is contained in:
parent
5d688e6e5d
commit
fe0a322b87
6 changed files with 34 additions and 17 deletions
|
|
@ -154,7 +154,9 @@ class DatabaseConfig
|
|||
/** @var Contracts\TenantDatabaseManager $databaseManager */
|
||||
$databaseManager = app($databaseManagers[$driver]);
|
||||
|
||||
$databaseManager->setConnection($this->getTemplateConnectionName());
|
||||
if ($databaseManager instanceof Contracts\StatefulTenantDatabaseManager) {
|
||||
$databaseManager->setConnection($this->getTemplateConnectionName());
|
||||
}
|
||||
|
||||
return $databaseManager;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue