@extends('admin.layouts.index-template', [ 'pageTitle' => 'Preguntas Frecuentes (FAQs)', 'items' => $faqs, 'icon' => 'question', 'module' => 'FAQs', 'createRoute' => route('faqs.create'), 'indexRoute' => route('faqs.index'), 'searchPlaceholder' => 'Buscar FAQs por pregunta, respuesta...', 'emptyIcon' => 'question-circle', 'emptyTitle' => 'No hay FAQs', 'emptyMessage' => 'Crea tu primera pregunta frecuente para comenzar', 'stats' => [ 'total' => [ 'label' => 'Total FAQs', 'count' => $faqs->total(), 'color' => 'info', 'icon' => 'question' ], 'active' => [ 'label' => 'FAQs Activas', 'count' => \App\Models\Faq::where('status', 1)->count(), 'color' => 'success', 'icon' => 'checkbox-circle' ], 'inactive' => [ 'label' => 'FAQs Inactivas', 'count' => \App\Models\Faq::where('status', 0)->count(), 'color' => 'warning', 'icon' => 'close-circle' ], 'categories' => [ 'label' => 'Categorías', 'count' => \App\Models\FaqCategory::count(), 'color' => 'primary', 'icon' => 'folder' ] ] ]) @push('css') @endpush @section('header-buttons') Nueva FAQ @endsection @section('action-buttons') Categorías @endsection @section('filters')
@endsection @section('table-headers') ID Categoría Pregunta Nombre Orden Estado SEO con IA Acciones @endsection @section('table-body') @foreach($faqs as $faq) {{ $faq->id }} @if($faq->faq_category) {{ $faq->faq_category->name }} @else Sin categoría @endif {{ Str::limit(strip_tags($faq->question), 60) }} @if($faq->name)
{{ $faq->name }} @endif {{ $faq->slug }} {{ $faq->order }} @if($faq->status == 1) Activa @else Inactiva @endif @if($faq->ai_generated_at) Generado @endif
@endforeach @endsection @push('js') @endpush