@extends('backend.layouts.layout') @section('content')

Banners Management

Banners List

@foreach($banners as $banner) @endforeach
# Image Title Position Associated With Status Schedule Created Actions
{{ $loop->iteration }} @if($banner->image) {{ $banner->title }} @else
@endif
{{ $banner->title ?? 'No Title' }} @if($banner->short_description)

{{ Str::limit($banner->short_description, 50) }}

@endif
Position {{ $banner->position }} @if($banner->bannerable_type && $banner->bannerable) {{ class_basename($banner->bannerable_type) }}: {{ $banner->bannerable->name ?? $banner->bannerable->title ?? 'N/A' }} @else General @endif @php $now = now(); $isActive = $banner->status == 1; $isScheduled = $banner->start_date && $banner->end_date; $isCurrentlyActive = $isScheduled ? ($now->between($banner->start_date, $banner->end_date)) : $isActive; @endphp @if($isCurrentlyActive) Active @elseif($isScheduled && $now->lt($banner->start_date)) Scheduled @elseif($isScheduled && $now->gt($banner->end_date)) Expired @else Inactive @endif @if($banner->button_text)
{{ $banner->button_text }} @endif
@if($banner->start_date && $banner->end_date) {{ $banner->start_date->format('d M Y') }}
to
{{ $banner->end_date->format('d M Y') }}
@else No schedule @endif
{{ $banner->created_at->format('d M Y') }}
@csrf @method('DELETE')
@endsection @push('styles') @endpush @push('scripts') @endpush