1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2025-12-12 06:44:04 +00:00

Correct storagePath and publicPath variables

This commit is contained in:
lukinovec 2022-09-27 10:24:45 +02:00
parent e9cb5aae31
commit e3aa8e2086

View file

@ -25,11 +25,11 @@ trait DealsWithTenantSymlinks
$tenantKey = $tenant->getTenantKey();
foreach ($diskUrls as $disk => $publicPath) {
$storagePath = str_replace('%storage_path%', $suffixBase . $tenantKey, $disks[$disk]);
$publicPath = str_replace('%tenant_id%', $tenantKey, $publicPath);
$storagePath = storage_path(str_replace('%storage_path%', $suffixBase . $tenantKey, $disks[$disk]));
$publicPath = public_path(str_replace('%tenant_id%', $tenantKey, $publicPath));
tenancy()->central(function () use ($symlinks, $publicPath, $storagePath) {
$symlinks->push([public_path($publicPath) => storage_path($storagePath)]);
$symlinks->push([$publicPath => $storagePath]);
});
}