$this->id, 'code' => $this->code, 'title' => $this->title, 'status' => $this->whenLoaded('status', fn () => new ProjectStatusResource($this->status)), 'type' => $this->whenLoaded('type', fn () => new ProjectTypeResource($this->type)), 'approved_estimate' => $this->formatEstimate($this->approved_estimate), 'forecasted_effort' => $this->forecasted_effort, 'start_date' => $this->formatDate($this->start_date), 'end_date' => $this->formatDate($this->end_date), 'created_at' => $this->formatDate($this->created_at), 'updated_at' => $this->formatDate($this->updated_at), ]; } private function formatEstimate(?float $value): ?string { return $value !== null ? number_format((float) $value, 2, '.', '') : null; } }