@extends('layouts.admin') @section('content')

Manage Events

View, edit, or remove events displayed on the Grace Family Church website.

Admin Note: Use this page to manage events on the public events page. You can edit event details, update images, or mark events as completed.

"For where two or three gather in my name, there am I with them." — Matthew 18:20

@include('partials.alerts') @include('partials.admin-filter', [ 'action' => route('admin.events'), 'q' => $q, 'searchPlaceholder' => 'Search by title, location, or speaker…', 'selects' => [['name' => 'status', 'value' => $status, 'all' => 'All statuses', 'options' => ['Upcoming' => 'Upcoming', 'Completed' => 'Completed']]], 'active' => $q !== '' || $status !== '', ]) @if($events->count() > 0)
@foreach($events as $event) @endforeach
Title Date & Time Location Status Actions
{{ $event->title }} {{ $event->event_date->format('d M Y') }} | {{ date('H:i', strtotime($event->event_time)) }} {{ $event->location }} @if($event->status === 'Upcoming') Upcoming @else Completed @endif @php $eventActions = [ ['type' => 'link', 'label' => 'View on site', 'icon' => 'fa-eye', 'url' => route('community.events'), 'target' => '_blank'], ]; if ($event->status !== 'Completed') { $eventActions[] = ['type' => 'link', 'label' => 'Edit', 'icon' => 'fa-pen', 'url' => route('admin.events.edit', $event)]; $eventActions[] = ['type' => 'form', 'label' => 'Mark Complete', 'icon' => 'fa-check', 'url' => route('admin.events.complete', $event), 'method' => 'PATCH', 'confirm' => ['title' => 'Mark as Completed?', 'message' => 'This event will be moved to Past Events on the public page.', 'confirmText' => 'Yes, Complete', 'type' => 'success']]; } $eventActions[] = ['type' => 'form', 'label' => 'Delete', 'icon' => 'fa-trash', 'url' => route('admin.events.delete', $event), 'method' => 'DELETE', 'danger' => true, 'confirm' => ['title' => 'Delete Event?', 'message' => 'This will permanently remove the event and all its images.', 'confirmText' => 'Yes, Delete']]; @endphp @include('partials.admin-actions', ['actions' => $eventActions])
{{ $events->links() }}
@else

No Events Found

There are currently no events in the system. Once events are added, they will appear here and on the public events page.

Add the First Event
@endif
@endsection