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

update to an if/else

This commit is contained in:
Pete Cooper 2020-10-02 10:13:20 +01:00 committed by GitHub
parent ddf0a40b53
commit 3b6a24f08e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

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