getDownDatabasePayload(); tenancy()->runForMultiple($this->getTenants(), function ($tenant) use ($payload) { $this->components->info("Tenant: {$tenant->getTenantKey()}"); $tenant->putDownForMaintenance($payload); }); $this->components->info('Tenants are now in maintenance mode.'); return 0; } /** * Get the payload to be placed in the "down" file. This * payload is the same as the original function * but without the 'template' option. */ protected function getDownDatabasePayload(): array { return [ 'except' => $this->excludedPaths(), 'redirect' => $this->redirectPath(), 'retry' => $this->getRetryTime(), 'refresh' => $this->option('refresh'), 'secret' => $this->option('secret'), 'status' => (int) ($this->option('status') ?? 503), ]; } }