@foreach($all as $data) @if ($data instanceof \App\Models\User)
{{ $data->fullName()}}
@if($data->dogs->first())
{{ $data->dogs->first()->breed->name }}
@endif

@if((int)$data->distance != 0) {{ number_format((float)$data->distance, 2, '.', '') }} km @else {{ number_format((float)$data->distance*1000, 2, '.', '') }} m @endif

@elseif ($data instanceof \App\Models\Business)
{{ $data->business_name}}{{ $data->businessType->name}}

{{ strlen($data->description) > 50 ? substr($data->description, 0, 50) . '...' : $data->description }}

@if((int)$data->distance != 0) {{ number_format((float)$data->distance, 2, '.', '') }} km @else {{ number_format((float)$data->distance*1000, 2, '.', '') }} m @endif

{{ $data->address ? "$data->address, " : ""}} {{ $data->city ? "$data->city, " : ""}} {{ $data->country ? "$data->country" : ""}}
@elseif ($data instanceof \App\Models\Event)
Group walk
{{ $data->location }}

@if((int)$data->distance != 0) {{ number_format((float)$data->distance, 2, '.', '') }} km @else {{ number_format((float)$data->distance*1000, 2, '.', '') }} m @endif

{{ \Carbon\Carbon::parse($data->date)->format('d F') }}, {{\Carbon\Carbon::parse($data->start_time)->format('g:i A')}}
@endif @endforeach
{{-- {{ $all->links() }} --}} {{ $all->onEachSide(3)->links('custom-pagination-links-view') }}