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

View Banner Details

Banner Details

Title:
{{ $banner->title ?? 'No Title' }}
Position:
Position {{ $banner->position }}
@if($banner->short_description)
Short Description:
{{ $banner->short_description }}
@endif @if($banner->button_text)
Button Text:
{{ $banner->button_text }}
@endif @if($banner->button_link)
Button Link:
{{ $banner->button_link }}
@endif
Created:
{{ $banner->created_at->format('F d, Y h:i A') }}
Last Updated:
{{ $banner->updated_at->format('F d, Y h:i A') }}
@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($isScheduled)
Schedule

Start: {{ $banner->start_date->format('M d, Y h:i A') }}

End: {{ $banner->end_date->format('M d, Y h:i A') }}

@endif
@if($banner->long_description)
Detailed Description
{!! nl2br(e($banner->long_description)) !!}
@endif
@if($banner->bannerable)

Associated With

{{ class_basename($banner->bannerable_type) }}: {{ $banner->bannerable->name ?? $banner->bannerable->title }}
@if(isset($banner->bannerable->description))

{{ Str::limit($banner->bannerable->description, 200) }}

@endif @if($banner->bannerable_type == 'App\\Models\\Product') View Product @elseif($banner->bannerable_type == 'App\\Models\\Category') View Category @endif
@endif

Banner Image

@if($banner->image) {{ $banner->title }}
Uploaded: @if($banner->image && file_exists(public_path($banner->image))) {{ \Carbon\Carbon::createFromTimestamp(filemtime(public_path($banner->image)))->diffForHumans() }} @else N/A @endif
@else

No image uploaded

@endif

Quick Actions

Edit Banner @php $isActive = $banner->status == 1; $isScheduled = $banner->start_date && $banner->end_date; $now = now(); $isCurrentlyActive = $isScheduled ? ($now->between($banner->start_date, $banner->end_date)) : $isActive; @endphp @if($isCurrentlyActive)
@csrf @method('PUT')
@else
@csrf @method('PUT')
@endif

Live Preview

This is how your banner appears on the website

@endsection @push('styles') @endpush @push('scripts') @endpush