$this->id, 'patient' => [ 'id' => $this->patient->id, 'name' => $this->patient->fullName(), 'phone' => $this->patient->phone, ], 'therapist' => [ 'id' => $this->user->id, 'name' => $this->user->name, ], 'appointment_date' => $this->appointment_date->format('Y-m-d'), 'appointment_time' => $this->appointment_date->format('H:i'), 'duration_minutes' => $this->duration_minutes, 'end_time' => $this->appointment_date->copy()->addMinutes($this->duration_minutes)->format('H:i'), 'status' => $this->status, 'notes' => $this->notes, 'created_at' => $this->created_at?->format('Y-m-d H:i:s'), ]; } }