getDownFilePayload(), JSON_PRETTY_PRINT) ); $this->comment('Application is now in maintenance mode.'); } /** * Get the payload to be placed in the "down" file. * * @return array */ protected function getDownFilePayload() { return [ 'time' => $this->currentTime(), 'message' => $this->option('message'), 'retry' => $this->getRetryTime(), ]; } /** * Get the number of seconds the client should wait before retrying their request. * * @return int|null */ protected function getRetryTime() { $retry = $this->option('retry'); return is_numeric($retry) && $retry > 0 ? (int) $retry : null; } }