getTenants(); if (count($tenants) === 1) { return $tenants[0]->run(function () { return $this->laravel->call([$this, 'handle']); }); } foreach ($tenants as $tenant) { $tenant->run(function () { $this->laravel->call([$this, 'handle']); }); } return 1; } /** * Get an array of tenants for which the command should be executed. * * @return Tenant[] */ abstract protected function getTenants(): array; }