@if(isset($heroBanners) && $heroBanners->count() > 0)
@php $mainBanners = $heroBanners->whereIn('position', ['main', 'hero'])->take(5); @endphp @foreach($mainBanners as $banner) @endforeach
@php $sideBanners = isset($heroBanners) ? $heroBanners->where('position', 'side')->take(2) : collect(); if($sideBanners->isEmpty() && isset($heroBanners)) { $sideBanners = $heroBanners->whereNotIn('position', ['main', 'hero'])->take(2); } @endphp @foreach($sideBanners as $banner) @endforeach
@push('scripts') @endpush @endif