1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2025-12-14 14:44:02 +00:00

Add more tests, fix bugs

This commit is contained in:
Samuel Štancl 2019-02-08 17:54:53 +01:00
parent d14aa0b642
commit 3f650d887d
4 changed files with 65 additions and 8 deletions

View file

@ -7,7 +7,7 @@ use Illuminate\Support\Facades\Redis;
trait BootstrapsTenancy
{
public $oldStoragePaths;
public $oldStoragePaths = [];
public function bootstrap()
{
@ -40,7 +40,7 @@ trait BootstrapsTenancy
public function suffixFilesystemRootPaths()
{
$old = [
$old = $this->oldStoragePaths ?: [
"storage_disks" => [],
"storage_path" => $this->app->storagePath(),
];
@ -59,7 +59,7 @@ trait BootstrapsTenancy
}
// storage_path()
$this->app->useStoragePath($this->app->storagePath() . "/{$suffix}");
$this->app->useStoragePath($old['storage_path'] . "/{$suffix}");
$this->oldStoragePaths = $old;
}