diff --git a/src/Commands/TenantList.php b/src/Commands/TenantList.php index f470124e..0cda8b6e 100644 --- a/src/Commands/TenantList.php +++ b/src/Commands/TenantList.php @@ -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() ?? []) : "") + ); }); } }