mirror of
https://github.com/archtechx/tenancy.git
synced 2026-02-06 01:44:04 +00:00
fix: fixes custom disk file url for non-root_override disks
Before:
Storage::disk('branding')->url('logo.png') returns 'storage/logo.png'
After:
Storage::disk('branding')->url('logo.png') returns 'storage/tenant1/logo.png'
This commit is contained in:
parent
d9b7107900
commit
db4aec7771
1 changed files with 5 additions and 0 deletions
|
|
@ -72,6 +72,11 @@ class FilesystemTenancyBootstrapper implements TenancyBootstrapper
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->app['config']["filesystems.disks.{$disk}.root"] = $finalPrefix;
|
$this->app['config']["filesystems.disks.{$disk}.root"] = $finalPrefix;
|
||||||
|
|
||||||
|
if (!isset($this->app['config']["tenancy.filesystem.root_override.{$disk}"])) {
|
||||||
|
$originalUrl = $this->app['config']["filesystems.disks.{$disk}.url"];
|
||||||
|
$this->app['config']["filesystems.disks.{$disk}.url"] = $originalUrl ? rtrim($originalUrl, '/') . '/'. $suffix : $suffix;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue