{{-- The results, in whichever view the visitor chose. Grid, list, map and split are the same query rendered four ways — the view is a query-string key, so a shared link opens on the same one. --}} @php($view = $criteria->view ?? 'grid') @if ($listings->isEmpty() && $view !== 'map') @else @switch($view) @case('list')
@foreach ($listings as $listing) @include('public.partials.listing-row', ['listing' => $listing, 'favouritedIds' => $favouritedIds ?? []]) @endforeach
@break @case('map') @include('public.partials.listing-map') @break @case('split')
@foreach ($listings as $listing) @include('public.partials.listing-row', ['listing' => $listing, 'favouritedIds' => $favouritedIds ?? []]) @endforeach
@include('public.partials.listing-map', ['fill' => true])
@break @default
@foreach ($listings as $listing) @include('public.partials.listing-card', ['listing' => $listing, 'favouritedIds' => $favouritedIds ?? []]) @endforeach
@endswitch @if ($view !== 'map' && method_exists($listings, 'links'))
{{ $listings->links() }}
@endif @endif