1
0
Fork 0
mirror of https://github.com/archtechx/tenancy.git synced 2026-02-05 19:34:04 +00:00

Fix tenants:list when not using multi-domain tenancy

This commit is contained in:
Pete Cooper 2020-10-01 17:33:57 +01:00 committed by GitHub
parent 411d486282
commit 9978fefa77
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

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