list dokter, list RS

This commit is contained in:
pajri
2022-12-15 17:10:25 +07:00
parent 1baaf80b2b
commit 1857653ce0
14 changed files with 17506 additions and 116 deletions

View File

@@ -0,0 +1,31 @@
<?php
namespace Modules\Internal\Transformers;
use Illuminate\Http\Resources\Json\JsonResource;
class OrganizationResource extends JsonResource
{
/**
* Transform the resource into an array.
*
* @param \Illuminate\Http\Request
* @return array
*/
public function toArray($request)
{
$organization = [
'name' => $this->name,
'type' => $this->type,
'code' => $this->code,
'description' => $this->description,
'kodeRs' => $this->meta->kodeRs ?? null,
'phone' => $this->meta->phone ?? null,
'lat' => $this->currentAddress->lat ?? null,
'lng' => $this->currentAddress->lng ?? null,
'address' => $this->currentAddress ?? null,
];
return $organization;
}
}