*/ public function toArray(Request $request): array { return [ 'id' => $this->id, 'server_id' => $this->server_id, 'name' => $this->name, 'command' => $this->command, 'user' => $this->user, 'auto_start' => $this->auto_start, 'auto_restart' => $this->auto_restart, 'numprocs' => $this->numprocs, 'status' => $this->status, 'status_color' => Worker::$statusColors[$this->status] ?? 'gray', 'created_at' => $this->created_at, 'updated_at' => $this->updated_at, ]; } }