@php $editId = (int) request('edit'); $row = $editId ? $faqs->firstWhere('id', $editId) : null; $open = $row || request()->has('new') || $errors->any(); $live = $faqs->where('published', true)->count(); $contexts = $faqs->pluck('context')->filter()->unique()->sort()->values(); $groups = $faqs->groupBy(fn ($f) => $f->context ?: 'general'); @endphp @if($open)
@endif| Question | Category | Order | Status | Actions |
|---|---|---|---|---|
| {{ $f->question }}{{ \Illuminate\Support\Str::limit($f->answer, 110) }} | {{ $ctx }} | {{ $f->sort_order }} |