@php $banners = \App\Models\Banner::where('position', $position ?? '') ->where('is_active', true) ->where(function ($w) { $w->whereNull('open_date')->orWhere('open_date', '<=', now()); }) ->where(function ($w) { $w->whereNull('close_date')->orWhere('close_date', '>=', now()); }) ->orderBy('ordering')->limit(6)->get(); @endphp @if($banners->count())
@foreach($banners as $b) @php $img = $b->image; @endphp @if($img){{ $b->title }}@endif @if($b->adtext)
{{ $b->adtext }}
@endif
@endforeach
@endif