1
0
Fork 0
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:
lukinovec 2024-02-10 19:13:02 +01:00 committed by GitHub
parent 6784685054
commit 222bbe4c02
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 14 additions and 15 deletions

View file

@ -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}"] ?? ''
)) {

View file

@ -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)]);