mirror of
https://github.com/archtechx/tenancy.git
synced 2025-12-12 11:14:04 +00:00
[2.2.0] Optional storage path suffixing (#197)
* Optional storage path suffixing * Default value true
This commit is contained in:
parent
869ac32983
commit
3ec4314e91
2 changed files with 4 additions and 1 deletions
|
|
@ -42,6 +42,7 @@ return [
|
|||
],
|
||||
'filesystem' => [ // https://tenancy.samuelstancl.me/docs/v2/filesystem-tenancy/
|
||||
'suffix_base' => 'tenant',
|
||||
'suffix_storage_path' => true, // Note: Disabling this will likely break local disk tenancy. Only disable this if you're using an external file storage service like S3.
|
||||
// Disks which should be suffixed with the suffix_base + tenant id.
|
||||
'disks' => [
|
||||
'local',
|
||||
|
|
|
|||
|
|
@ -38,7 +38,9 @@ class FilesystemTenancyBootstrapper implements TenancyBootstrapper
|
|||
$suffix = $this->app['config']['tenancy.filesystem.suffix_base'] . $tenant->id;
|
||||
|
||||
// storage_path()
|
||||
$this->app->useStoragePath($this->originalPaths['storage'] . "/{$suffix}");
|
||||
if ($this->app['config']['tenancy.filesystem.suffix_storage_path'] ?? true) {
|
||||
$this->app->useStoragePath($this->originalPaths['storage'] . "/{$suffix}");
|
||||
}
|
||||
|
||||
// asset()
|
||||
if ($this->originalPaths['asset_url']) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue