fix route dashboard
This commit is contained in:
@@ -18,8 +18,8 @@ class HospitalResource extends JsonResource
|
||||
return [
|
||||
'id' => $this->id,
|
||||
'name' => $this->name,
|
||||
'address' => $this->currentAddress ?? null,
|
||||
'distance' => $this->distance < 1 ? round($this->distance * 1000, 2) . " m" : round($this->distance, 2) . " km",
|
||||
'address' => $this->currentAddress->text ?? null,
|
||||
'distance' => $this->distance ? ($this->distance < 1 ? round($this->distance * 1000, 2) . " m" : round($this->distance, 2) . " km") : null,
|
||||
'photos' => [
|
||||
'title' => Str::slug($this->name),
|
||||
'url' => asset('images/default-doctor-avatar.png')
|
||||
|
||||
Reference in New Issue
Block a user