Initial commit - Physiotherapy Clinic Management System

This commit is contained in:
Deploy committed 2026-03-10 00:38:51 +03:00
commit dbb326f2cc
300 files changed
+144285

No files matched your search

@@ -0,0 +1,32 @@
<?php
namespace App\Http\Resources;
use Illuminate\Http\Request;
use Illuminate\Http\Resources\Json\JsonResource;
class AppointmentResource extends JsonResource
{
public function toArray(Request $request): array
{
return [
'id' => $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'),
];
}
}