CRUD Doctor Hospital
This commit is contained in:
@@ -14,17 +14,24 @@ class OrganizationResource extends JsonResource
|
||||
*/
|
||||
public function toArray($request)
|
||||
{
|
||||
|
||||
$organization = [
|
||||
'id' => $this->id,
|
||||
'name' => $this->name,
|
||||
'type' => $this->type,
|
||||
'code' => $this->code,
|
||||
'description' => $this->description,
|
||||
'kodeRs' => $this->meta->kodeRs ?? null,
|
||||
'kodeRs' => $this->meta->KodeRS ?? null,
|
||||
'phone' => $this->meta->phone ?? null,
|
||||
'lat' => $this->currentAddress->lat ?? null,
|
||||
'lng' => $this->currentAddress->lng ?? null,
|
||||
'address' => $this->currentAddress ?? null,
|
||||
'address' => $this->currentAddress->text ?? null,
|
||||
'province_id' => $this->currentAddress->province_id ?? null,
|
||||
'city_id' => $this->currentAddress->city_id ?? null,
|
||||
'district_id' => $this->currentAddress->district_id ?? null,
|
||||
'village_id' => $this->currentAddress->village_id ?? null,
|
||||
'postal_code' => $this->currentAddress->postal_code ?? null,
|
||||
'active' => $this->status == 'active' ? 1 : 0,
|
||||
];
|
||||
|
||||
return $organization;
|
||||
|
||||
Reference in New Issue
Block a user