mirror of
https://github.com/archtechx/tenancy.git
synced 2025-12-12 14:34:04 +00:00
Final filesystem-related changes (#25)
* Change %tenant_id% to %tenant% * ID -> key --------- Co-authored-by: Samuel Štancl <samuel.stancl@gmail.com>
This commit is contained in:
parent
6784685054
commit
222bbe4c02
6 changed files with 14 additions and 15 deletions
|
|
@ -83,7 +83,7 @@ class FilesystemTenancyBootstrapper implements TenancyBootstrapper
|
|||
$this->originalPaths['disks']['url'][$disk] = $diskConfig['url'] ?? null;
|
||||
|
||||
if ($url = str_replace(
|
||||
'%tenant_id%',
|
||||
'%tenant%',
|
||||
(string) $tenant->getTenantKey(),
|
||||
$this->app['config']["tenancy.filesystem.url_override.{$disk}"] ?? ''
|
||||
)) {
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@ trait DealsWithTenantSymlinks
|
|||
|
||||
foreach ($diskUrls as $disk => $publicPath) {
|
||||
$storagePath = str_replace('%storage_path%', $suffixBase . $tenantKey, $disks[$disk]);
|
||||
$publicPath = str_replace('%tenant_id%', (string) $tenantKey, $publicPath);
|
||||
$publicPath = str_replace('%tenant%', (string) $tenantKey, $publicPath);
|
||||
|
||||
tenancy()->central(function () use ($symlinks, $publicPath, $storagePath) {
|
||||
$symlinks->push([public_path($publicPath) => storage_path($storagePath)]);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue