@extends('layouts.admin.master') @section('head') @section('title')Bargain Book Hut β Events@endsection @endsection @section('body')
Manage homepage/marketing events β image, destination link, and the schedule window they're shown in.
| # | Event | Schedule | Actions | Status | ||
|---|---|---|---|---|---|---|
| β Ώ | @else@endif | {{ $loop->iteration }} | @php $today = \Carbon\Carbon::today(); $starts = $event->starts_at ? \Carbon\Carbon::parse($event->starts_at) : null; $ends = $event->ends_at ? \Carbon\Carbon::parse($event->ends_at) : null; $expired = $ends && $ends->lt($today); @endphp @if(!$starts && !$ends) Always on @elseif($expired) Expired {{ $ends->format('d M Y') }} @else {{ $starts ? $starts->format('d M') : 'β' }} β {{ $ends ? $ends->format('d M Y') : 'ongoing' }} @endif |
|
status ?? 1) == 1 ? 'checked' : '' }}
onchange="updateEventStatus({{ $event->id }}, this.checked ? 1 : 0)">
|
|
|
No events yet. Add your first event above. |
||||||