getTenants(); try { if ($this->option('remove')) { $this->removeLinks($tenants); } else { $this->createLinks($tenants); } } catch (Exception $exception) { $this->error($exception->getMessage()); } } protected function removeLinks(LazyCollection $tenants): void { RemoveStorageSymlinksAction::handle($tenants); $this->info('The links have been removed.'); } protected function createLinks(LazyCollection $tenants): void { CreateStorageSymlinksAction::handle( $tenants, $this->option('relative') ?? false, $this->option('force') ?? false, ); $this->info('The links have been created.'); } }