Add Distance Calculation
This commit is contained in:
@@ -22,7 +22,7 @@ class HospitalResource extends JsonResource
|
||||
'address' => $this->currentAddress->text ?? null,
|
||||
'lat' => $this->currentAddress->lat ?? null,
|
||||
'lng' => $this->currentAddress->lng ?? null,
|
||||
'distance' => '200 m',
|
||||
'distance' => isset($this->distance_km) ? round($this->distance_km) . ' km' : '-',
|
||||
'city_name' => 'Kota Tangerang',
|
||||
'phone' => $this->meta->phone,
|
||||
'photo_url' => asset('images/default-hospital-image.png'),
|
||||
|
||||
Reference in New Issue
Block a user