Files
My-KOPKB/be/Modules/MembershipApplication/Transformers/MembershipApplicationApplicantResource.php

34 lines
1.2 KiB
PHP

<?php
namespace Modules\MembershipApplication\Transformers;
use Illuminate\Http\Request;
use Illuminate\Http\Resources\Json\JsonResource;
class MembershipApplicationApplicantResource extends JsonResource
{
public function toArray(Request $request): array
{
return [
'id' => $this->id,
'name' => $this->name,
'email' => $this->email,
'ic_number' => $this->ic_number,
'birth_date' => $this->birth_date,
'birth_place' => $this->birth_place,
'gender' => $this->gender,
'marriage_status' => $this->marriage_status,
'address' => $this->address,
'phone_number' => $this->phone_number,
'office_number' => $this->office_number,
'postcode' => $this->postcode,
'employer_name' => $this->employer_name,
'employer_address' => $this->employer_address,
'current_position' => $this->current_position,
'start_work_date' => $this->start_work_date?->toDateString(),
'stock_monthly_contribution' => $this->stock_monthly_contribution,
'fee_monthly_contribution' => $this->fee_monthly_contribution,
];
}
}