1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2025-12-12 23:14:03 +00:00

Fix tenants:list when not using multi-domain tenancy (#504)

* Fix tenants:list when not using multi-domain tenancy

* formatting

* update to an if/else
This commit is contained in:
Pete Cooper 2020-11-12 16:23:58 +00:00 committed by GitHub
parent 1c93360077
commit dd1b7fc86d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -35,7 +35,11 @@ class TenantList extends Command
->query()
->cursor()
->each(function (Tenant $tenant) {
$this->line("[Tenant] id: {$tenant['id']} @ " . implode('; ', $tenant->domains->pluck('domain')->toArray() ?? []));
if ($tenant->domains) {
$this->line("[Tenant] id: {$tenant['id']} @ " . implode('; ', $tenant->domains->pluck('domain')->toArray() ?? []));
} else {
$this->line("[Tenant] id: {$tenant['id']}");
}
});
}
}