Merge branch 'master' of itcorp.primaya.id:rajif/aso
This commit is contained in:
@@ -1,9 +1,8 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Linksehat\Transformers\Dashboard;
|
||||
namespace Modules\Linksehat\Transformers\Hospital;
|
||||
|
||||
use Illuminate\Http\Resources\Json\JsonResource;
|
||||
use Str;
|
||||
|
||||
class HospitalResource extends JsonResource
|
||||
{
|
||||
@@ -17,12 +16,14 @@ class HospitalResource extends JsonResource
|
||||
{
|
||||
return [
|
||||
'id' => $this->id,
|
||||
'name' => $this->name ?? '',
|
||||
'address' => $this->currentAddress ?? '',
|
||||
'name' => $this->name,
|
||||
'address' => $this->address ?? null,
|
||||
'distance' => $this->distance ? ($this->distance < 1 ? round($this->distance * 1000, 2) . " m" : round($this->distance, 2) . " km") : null,
|
||||
'city_name' => $this->city_name ?? null,
|
||||
'phone' => $this->meta->phone,
|
||||
'photos' => [
|
||||
'title' => Str::slug($this->name),
|
||||
'url' => asset('images/default-hospital-image.png'),
|
||||
'title' => $this->name,
|
||||
'photo_url' => url('images/default-hospital-image.png'),
|
||||
]
|
||||
];
|
||||
}
|
||||
Reference in New Issue
Block a user