1
0
Fork 0
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:
Samuel Štancl 2020-05-29 09:33:49 +02:00
parent ed200ab733
commit 43d75cdd38
3 changed files with 9 additions and 8 deletions

View file

@ -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() ?? []));
});
}
}