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
@endif
@if($isCurrentlyActive)
ACTIVE @elseif($isScheduled && $now->lt($banner->start_date))
SCHEDULED @elseif($isScheduled && $now->gt($banner->end_date))
EXPIRED @else
INACTIVE @endif
@if($isScheduled)
ACTIVE @elseif($isScheduled && $now->lt($banner->start_date))
SCHEDULED @elseif($isScheduled && $now->gt($banner->end_date))
EXPIRED @else
INACTIVE @endif
Schedule
Start: {{ $banner->start_date->format('M d, Y h:i A') }}
End: {{ $banner->end_date->format('M d, Y h:i A') }}
Detailed Description
{!! nl2br(e($banner->long_description)) !!}
@endif
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 @endifBanner Image
@if($banner->image)
@endif
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
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)
@else
@endif
Live Preview
This is how your banner appears on the website