diff --git a/src/Commands/Link.php b/src/Commands/Link.php index fabde169..17f2f1a5 100644 --- a/src/Commands/Link.php +++ b/src/Commands/Link.php @@ -63,7 +63,7 @@ class Link extends Command { RemoveStorageSymlinksAction::handle( $tenants, - afterLinkRemoval: fn($publicPath) => $this->info("The [$publicPath] link has been removed.") + afterLinkRemoval: fn ($publicPath) => $this->info("The [$publicPath] link has been removed.") ); $this->info('The links have been removed.'); @@ -79,7 +79,7 @@ class Link extends Command $tenants, $this->option('relative') ?? false, $this->option('force') ?? false, - afterLinkCreation: fn($publicPath, $storagePath) => $this->info("The [$publicPath] link has been connected to [$storagePath].") + afterLinkCreation: fn ($publicPath, $storagePath) => $this->info("The [$publicPath] link has been connected to [$storagePath].") ); $this->info('The links have been created.'); diff --git a/src/Concerns/DealsWithTenantSymlinks.php b/src/Concerns/DealsWithTenantSymlinks.php index b0aa052d..1ed62f85 100644 --- a/src/Concerns/DealsWithTenantSymlinks.php +++ b/src/Concerns/DealsWithTenantSymlinks.php @@ -1,5 +1,7 @@ $storagePath]; } - return collect($symlinks)->mapWithKeys(fn($item) => $item); + return collect($symlinks)->mapWithKeys(fn ($item) => $item); } /** diff --git a/src/CreateStorageSymlinksAction.php b/src/CreateStorageSymlinksAction.php index 508f8993..351a88b9 100644 --- a/src/CreateStorageSymlinksAction.php +++ b/src/CreateStorageSymlinksAction.php @@ -1,13 +1,15 @@ $storagePath) { + foreach (static::possibleTenantSymlinks($tenant) as $publicPath => $storagePath) { static::createLink($publicPath, $storagePath, $tenant, $relativeLink, $force, $afterLinkCreation); } } diff --git a/src/Jobs/RemoveStorageSymlinks.php b/src/Jobs/RemoveStorageSymlinks.php index 9d2c700e..79ff8335 100644 --- a/src/Jobs/RemoveStorageSymlinks.php +++ b/src/Jobs/RemoveStorageSymlinks.php @@ -5,11 +5,11 @@ declare(strict_types=1); namespace Stancl\Tenancy\Jobs; use Illuminate\Bus\Queueable; -use Stancl\Tenancy\Contracts\Tenant; -use Illuminate\Queue\SerializesModels; -use Illuminate\Queue\InteractsWithQueue; use Illuminate\Contracts\Queue\ShouldQueue; use Illuminate\Foundation\Bus\Dispatchable; +use Illuminate\Queue\InteractsWithQueue; +use Illuminate\Queue\SerializesModels; +use Stancl\Tenancy\Contracts\Tenant; use Stancl\Tenancy\RemoveStorageSymlinksAction; class RemoveStorageSymlinks implements ShouldQueue diff --git a/src/RemoveStorageSymlinksAction.php b/src/RemoveStorageSymlinksAction.php index f01437c3..e7a9908e 100644 --- a/src/RemoveStorageSymlinksAction.php +++ b/src/RemoveStorageSymlinksAction.php @@ -1,13 +1,14 @@ $storagePath) { + foreach (static::possibleTenantSymlinks($tenant) as $publicPath => $storagePath) { static::removeLink($publicPath, $tenant, $afterLinkRemoval); } }