Files
kartoteka/app/Http/Resources/PatientInfoResource.php
2025-12-12 17:10:05 +09:00

26 lines
641 B
PHP

<?php
namespace App\Http\Resources;
use Illuminate\Http\Request;
use Illuminate\Http\Resources\Json\JsonResource;
class PatientInfoResource extends JsonResource
{
/**
* Transform the resource into an array.
*
* @return array<string, mixed>
*/
public function toArray(Request $request): array
{
return [
'id' => $this->id ?? $this->MedicalHistoryID,
'medcardnum' => $this->medcardnum ?? $this->MedCardNum,
'family' => $this->family ?? $this->FAMILY,
'name' => $this->name ?? $this->Name,
'ot' => $this->ot ?? $this->OT,
];
}
}