mirror of
https://github.com/archtechx/tenancy.git
synced 2025-12-14 07:54:04 +00:00
Improve code of pending tenants (#1025)
* Remove `--all` option from ClearPendingTenants * Improve query formatting * Remove redundant test * Convert time constrait options to int * Improve CreatePendingTenants success message
This commit is contained in:
parent
73c5655bc8
commit
7d3298c6bb
4 changed files with 19 additions and 46 deletions
|
|
@ -30,8 +30,8 @@ class CreatePendingTenants extends Command
|
|||
$createdCount++;
|
||||
}
|
||||
|
||||
$this->info($createdCount . ' ' . str('tenant')->plural($createdCount) . ' created.');
|
||||
$this->info($maxPendingTenantCount . ' ' . str('tenant')->plural($maxPendingTenantCount) . ' ready to be used.');
|
||||
$this->info($createdCount . ' pending ' . str('tenant')->plural($createdCount) . ' created.');
|
||||
$this->info($maxPendingTenantCount . ' pending ' . str('tenant')->plural($maxPendingTenantCount) . ' ready to be used.');
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -39,8 +39,7 @@ class CreatePendingTenants extends Command
|
|||
/** Calculate the number of currently available pending tenants. */
|
||||
protected function getPendingTenantCount(): int
|
||||
{
|
||||
return tenancy()
|
||||
->query()
|
||||
return tenancy()->query()
|
||||
->onlyPending()
|
||||
->count();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue