mirror of
https://github.com/archtechx/tenancy.git
synced 2026-02-05 17:14:03 +00:00
Make phpunit run
This commit is contained in:
parent
b07f5bdc22
commit
2de46e4274
8 changed files with 40 additions and 22 deletions
|
|
@ -54,9 +54,9 @@ class DatabaseManager
|
|||
*/
|
||||
public function connect(Tenant $tenant)
|
||||
{
|
||||
$this->createTenantConnection($tenant, $tenant->getConnectionName());
|
||||
$this->setDefaultConnection($tenant->getConnectionName());
|
||||
$this->switchConnection($tenant->getConnectionName());
|
||||
$this->createTenantConnection($tenant, $tenant->database()->getTemplateConnectionName());
|
||||
$this->setDefaultConnection($tenant->database()->getTemplateConnectionName());
|
||||
$this->switchConnection($tenant->database()->getTemplateConnectionName());
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -83,7 +83,7 @@ class DatabaseManager
|
|||
*/
|
||||
public function createTenantConnection(Tenant $tenant, $connectionName)
|
||||
{
|
||||
$this->app['config']["database.connections.$connectionName"] = $tenant->database->connection();
|
||||
$this->app['config']["database.connections.$connectionName"] = $tenant->database()->connection();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue