@extends('theme::layout') @section('title', 'FAQ') @section('content') @php $activeId = request('category', optional($categories->first())->id); $active = $categories->firstWhere('id', $activeId) ?? $categories->first(); @endphp @include('theme::_hero_banner', [ 'heroTitle' => 'Frequently Asked Questions', 'heroSubtitle' => 'Find answers to common questions about our parish', 'breadcrumbs' => [ ['label' => 'Home', 'url' => route('web.home')], ['label' => 'FAQ'], ], ]) @if($topwidget->isNotEmpty())
@foreach($topwidget as $widget) {!! $widget->content !!} @endforeach
@endif
@if($categories->isEmpty())

No FAQs available.

@else
{{-- LEFT: Category nav (1/4) --}} {{-- RIGHT: Questions panel (3/4) --}}
@if($active)

{{ $active->name }}

{{ $active->faq->count() }} {{ Str::plural('question', $active->faq->count()) }}
@if($active->faq->isEmpty())

No questions in this category yet.

@else
@foreach($active->faq as $item)
{{ $item->question }}
{!! $item->answer !!}
@endforeach
@endif @endif
@endif
@if($bottomwidget->isNotEmpty())
@foreach($bottomwidget as $widget) {!! $widget->content !!} @endforeach
@endif @endsection