香洲二院小程序
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
mini_xzey/app/Http/Resources/Patient/PatientDetailsResource.php

27 lines
722 B

<?php
namespace App\Http\Resources\Patient;
use Illuminate\Http\Request;
use Illuminate\Http\Resources\Json\JsonResource;
class PatientDetailsResource extends JsonResource
{
/**
* Transform the resource into an array.
*
* @return array<string, mixed>
*/
public function toArray(Request $request = null): array
{
return [
'patient_id' => $this->resource['patient_id'],
'patient_card_id' => $this->resource['patient_card_id'],
'patient_name' => $this->resource['name'],
'card_no' => $this->resource['card_no'],
'sex' => $this->resource['sex'],
'is_default' => $this->resource['def_status']
];
}
}