mirror of
https://github.com/archtechx/tenancy.git
synced 2026-02-04 17:04:03 +00:00
set the storage driver
This commit is contained in:
parent
70234e1123
commit
299437a3c3
2 changed files with 17 additions and 0 deletions
|
|
@ -325,4 +325,19 @@ class TenantManager
|
|||
{
|
||||
return $this->storage;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the storage driver.
|
||||
*
|
||||
* @param Interfaces\StorageDriver|string $driver
|
||||
* @return void
|
||||
*/
|
||||
public function setStorageDriver($driver)
|
||||
{
|
||||
if (is_string($driver)) {
|
||||
$driver = $this->app->make($driver);
|
||||
}
|
||||
|
||||
$this->storage = $driver;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -94,6 +94,8 @@ abstract class TestCase extends \Orchestra\Testbench\TestCase
|
|||
'database.redis.client' => 'phpredis',
|
||||
'tenancy.storage_driver' => DatabaseStorageDriver::class,
|
||||
]);
|
||||
tenancy()->setStorageDriver(DatabaseStorageDriver::class);
|
||||
|
||||
break;
|
||||
case '2':
|
||||
$app['config']->set([
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue