mirror of
https://github.com/archtechx/tenancy.git
synced 2025-12-12 19:34:04 +00:00
Fix tenants:list
This commit is contained in:
parent
ed200ab733
commit
43d75cdd38
3 changed files with 9 additions and 8 deletions
|
|
@ -33,12 +33,9 @@ class TenantList extends Command
|
|||
$this->info('Listing all tenants.');
|
||||
tenancy()
|
||||
->query()
|
||||
->when($this->option('tenants'), function ($query) {
|
||||
$query->whereIn(tenancy()->model()->getTenantKeyName(), $this->option('tenants'));
|
||||
})
|
||||
->cursor()
|
||||
->each(function (Tenant $tenant) {
|
||||
$this->line("[Tenant] id: {$tenant['id']} @ " . implode('; ', $tenant->domains ?? []));
|
||||
$this->line("[Tenant] id: {$tenant['id']} @ " . implode('; ', $tenant->domains->pluck('domain')->toArray() ?? []));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue