{{-- @php $bannerCount = count($offer); @endphp @for ($i = 0; $i < min (3, $bannerCount); $i++) @endfor --}} @php // Sort and get the last 3 banners from the collection $intro_banner = $intro_banner->sortByDesc('created_at')->take(3); @endphp @if ($intro_banner->isNotEmpty()) @foreach ($intro_banner as $banner) @endforeach @else

No banners available.

@endif