$this->id, 'provider_id' => $this->provider_id, 'client_id' => $this->client_id, 'client_name' => $this->client->user->name ?? null, 'client_email' => $this->client->user->email ?? null, 'client_phone' => $this->client->user->phone ?? null, 'client_rating' => $this->client->average_rating ?? null, 'client_photo' => $this->resolveClientPhoto(), 'created_at' => $this->created_at?->format('Y-m-d H:i'), 'updated_at' => $this->updated_at?->format('Y-m-d H:i'), ]; } private function resolveClientPhoto(): ?string { $path = $this->client->profileMedia->path ?? null; return $path ? Storage::temporaryUrl($path, now()->addMinutes(60)) : null; } }