mirror of
https://github.com/archtechx/tenancy.git
synced 2025-12-12 11:34:03 +00:00
[4.x] Update commands CLI outputs (#968)
* Using laravel components * Ensure commands returns success * update tests * clean * bump EndBug version * Update ci.yml * Update ci.yml * Update ci.yml * revert CI changes * Update ci.yml * Update ci.yml * Update ci.yml * revert CI changes to it's original state * fix typos, improve code * improve Install & TenantList commands * php-cs-fixer * type GitHub properly Co-authored-by: Abrar Ahmad <abrar.dev99@gmail.com> Co-authored-by: Samuel Štancl <samuel@archte.ch> Co-authored-by: Samuel Štancl <samuel.stancl@gmail.com>
This commit is contained in:
parent
05f1b2d6f5
commit
e4f5b92485
15 changed files with 217 additions and 96 deletions
|
|
@ -23,7 +23,7 @@ class Link extends Command
|
|||
|
||||
protected $description = 'Create or remove tenant symbolic links.';
|
||||
|
||||
public function handle(): void
|
||||
public function handle(): int
|
||||
{
|
||||
$tenants = $this->getTenants();
|
||||
|
||||
|
|
@ -35,14 +35,18 @@ class Link extends Command
|
|||
}
|
||||
} catch (Exception $exception) {
|
||||
$this->error($exception->getMessage());
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
protected function removeLinks(LazyCollection $tenants): void
|
||||
{
|
||||
RemoveStorageSymlinksAction::handle($tenants);
|
||||
|
||||
$this->info('The links have been removed.');
|
||||
$this->components->info('The links have been removed.');
|
||||
}
|
||||
|
||||
protected function createLinks(LazyCollection $tenants): void
|
||||
|
|
@ -53,6 +57,6 @@ class Link extends Command
|
|||
(bool) ($this->option('force') ?? false),
|
||||
);
|
||||
|
||||
$this->info('The links have been created.');
|
||||
$this->components->info('The links have been created.');
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue