@php $nearbyLocations = App\Models\NearByLocation::where('listing_id', $listing->id)->get(); @endphp @php $coordinates = $nearbyLocations->map(function ($location) { return [ 'latitude' => $location->latitude, 'longitude' => $location->longitude, 'name' => $location->name, 'type' => $location->type, ]; }); @endphp
{{ get_phrase(ucfirst(str_replace('_', ' ', $type))) }}