@forelse($banners as $banner) @php $statusType = 'active'; $statusText = 'Active'; $today = now()->startOfDay(); if (!$banner->status) { $statusType = 'inactive'; $statusText = 'Paused'; } elseif ($banner->start_date && $today < $banner->start_date) { $statusType = 'scheduled'; $statusText = 'Scheduled'; } elseif ($banner->end_date && $today > $banner->end_date) { $statusType = 'expired'; $statusText = 'Expired'; } @endphp @empty @endforelse @if($banners->hasPages())
{{ $banners->links() }}
@endif