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

Manage Sermons

View, edit, or remove sermons displayed on the church website.

Admin Note: Use this page to manage sermons on the public sermons page. Keep this section updated so visitors can easily access recent teachings.

"Preach the word; be ready in season and out of season." — 2 Timothy 4:2

@include('partials.alerts')
@if($q !== '' || $preacher !== '') @endif
@if($q !== '' || $preacher !== '')

Showing {{ $sermons->total() }} result{{ $sermons->total() === 1 ? '' : 's' }}@if($q) for "{{ $q }}"@endif.

@endif @if($sermons->count() > 0)
@foreach($sermons as $sermon) @endforeach
Title Preacher Passage Date Actions
{{ $sermon->title }} {{ $sermon->preacher }} {{ $sermon->main_reading }} {{ \Carbon\Carbon::parse($sermon->sermon_date)->format('j F Y') }} @include('partials.admin-actions', ['actions' => [ ['type' => 'modal', 'label' => 'View', 'icon' => 'fa-eye', 'target' => '#sermonModal-'.$sermon->id], ['type' => 'link', 'label' => 'Edit', 'icon' => 'fa-pen', 'url' => route('admin.sermons.edit', $sermon)], ['type' => 'form', 'label' => 'Delete', 'icon' => 'fa-trash', 'url' => route('admin.sermons.delete', $sermon), 'method' => 'DELETE', 'danger' => true, 'confirm' => ['title' => 'Delete Sermon?', 'message' => 'This will permanently remove this sermon. This cannot be undone.', 'confirmText' => 'Yes, Delete']], ]])
{{ $sermons->links() }}
@else
@if($q !== '' || $preacher !== '')

No Matching Sermons

No sermons match your search. Try different keywords or clear the filter.

Clear Filter @else

No Sermons Found

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

Add the First Sermon @endif
@endif
{{-- Sermon View Modals --}} @if(isset($sermons) && $sermons->count() > 0) @foreach($sermons as $sermon) @endforeach @endif @endsection