getDownDatabasePayload(); tenancy()->runForMultiple($this->option('tenants'), function ($tenant) use ($payload){ $this->line("Tenant: {$tenant['id']}"); $tenant->putDownForMaintenance($payload); }); $this->comment('Tenants are now in maintenance mode.'); } /** * Get the payload to be placed in the "down" file. * * @return array */ protected function getDownDatabasePayload() { return [ 'except' => $this->excludedPaths(), 'redirect' => $this->redirectPath(), 'retry' => $this->getRetryTime(), 'refresh' => $this->option('refresh'), 'secret' => $this->option('secret'), 'status' => (int) $this->option('status', 503), ]; } }