From e645a28e7c63c7490b5916d468a4e9406234eaf1 Mon Sep 17 00:00:00 2001 From: Michael Morris Date: Mon, 7 Dec 2020 01:21:54 -0500 Subject: [PATCH] [FIX] Storage base was labeled as a suffix when infact it was a prefix --- assets/config.php | 6 +++--- src/Bootstrappers/FilesystemTenancyBootstrapper.php | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/assets/config.php b/assets/config.php index e89c6c9d..de78b363 100644 --- a/assets/config.php +++ b/assets/config.php @@ -96,9 +96,9 @@ return [ */ 'filesystem' => [ /** - * Each disk listed in the 'disks' array will be suffixed by the suffix_base, followed by the tenant_id. + * Each disk listed in the 'disks' array will be prefixed by the storage_base, followed by the tenant_id. */ - 'suffix_base' => 'tenant', + 'storage_base' => 'tenant', 'disks' => [ 'local', 'public', @@ -150,8 +150,8 @@ return [ 'prefix_base' => 'tenant', // Each key in Redis will be prepended by this prefix_base, followed by the tenant id. 'prefixed_connections' => [ // Redis connections whose keys are prefixed, to separate one tenant's keys from another. // 'default', - ], ], +], /** * Features are classes that provide additional functionality diff --git a/src/Bootstrappers/FilesystemTenancyBootstrapper.php b/src/Bootstrappers/FilesystemTenancyBootstrapper.php index d5ae2d50..1b1b0b17 100644 --- a/src/Bootstrappers/FilesystemTenancyBootstrapper.php +++ b/src/Bootstrappers/FilesystemTenancyBootstrapper.php @@ -36,11 +36,11 @@ class FilesystemTenancyBootstrapper implements TenancyBootstrapper public function bootstrap(Tenant $tenant) { - $suffix = $this->app['config']['tenancy.filesystem.suffix_base'] . $tenant->getTenantKey(); + $storage_base = $this->app['config']['tenancy.filesystem.storage_base'] . $tenant->getTenantKey(); // storage_path() if ($this->app['config']['tenancy.filesystem.suffix_storage_path'] ?? true) { - $this->app->useStoragePath($this->originalPaths['storage'] . "/{$suffix}"); + $this->app->useStoragePath($this->originalPaths['storage'] . "/{$storage_base}"); } // asset()