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

Passing tests with DB storage driver

This commit is contained in:
Samuel Štancl 2019-09-18 20:08:30 +02:00
parent 12c05c0af6
commit 6b0ec1b554
4 changed files with 15 additions and 20 deletions

View file

@ -203,12 +203,12 @@ class Tenant implements ArrayAccess
public function getDatabaseName()
{
return $this['_tenancy_db_name'] ?? ($this->app['config']['tenancy.database.prefix'] . $this->id . $this->app['config']['tenancy.database.suffix']);
return $this->data['_tenancy_db_name'] ?? ($this->app['config']['tenancy.database.prefix'] . $this->id . $this->app['config']['tenancy.database.suffix']);
}
public function getConnectionName()
{
return $this['_tenancy_db_connection'] ?? 'tenant';
return $this->data['_tenancy_db_connection'] ?? 'tenant';
}
/**