*/ public function toArray(Request $request): array { return [ 'id' => $this->id, 'site_id' => $this->site_id, 'deployment_script_id' => $this->deployment_script_id, 'log_id' => $this->log_id, 'log' => new ServerLogResource($this->log), 'commit_id' => $this->commit_id, 'commit_id_short' => $this->commit_id_short, 'commit_data' => $this->commit_data, 'status' => $this->status, 'status_color' => Deployment::$statusColors[$this->status] ?? 'gray', 'updated_at' => $this->updated_at, 'created_at' => $this->created_at, ]; } }