MIF_E31221247/app/Http/Resources/PenggunaPasienResource.php

29 lines
706 B
PHP

<?php
namespace App\Http\Resources;
use Illuminate\Http\Request;
use Illuminate\Http\Resources\Json\JsonResource;
class PenggunaPasienResource extends JsonResource
{
/**
* Transform the resource into an array.
*
* @return array<string, mixed>
*/
public function toArray(Request $request): array
{
return [
'id' => $this->id,
'nama' => $this->nama,
'email' => $this->email,
'umur' => $this->umur,
'tanggal_lahir' => $this->tanggal_lahir,
'nama_orang_tua' => $this->nama_orang_tua,
'jenis_kelamin' => $this->jenis_kelamin,
'alamat' => $this->alamat,
];
}
}