@extends('admin.layouts.index-template', [ 'pageTitle' => 'Páginas', 'items' => $pages, 'icon' => 'file-text', 'module' => 'Páginas', 'createRoute' => route('pages.create'), 'indexRoute' => route('pages.index'), 'searchPlaceholder' => 'Buscar por nombre, slug o contenido...', 'emptyIcon' => 'file-alt', 'emptyTitle' => 'No hay páginas', 'emptyMessage' => 'Comience creando su primera página del sitio web', 'stats' => [ 'all' => [ 'label' => 'Total', 'count' => $pages->total(), 'color' => 'primary', 'icon' => 'file-text' ], 'today' => [ 'label' => 'Hoy', 'count' => \App\Models\Page::whereDate('created_at', today())->count(), 'color' => 'success', 'icon' => 'calendar-event' ], 'this_week' => [ 'label' => 'Esta Semana', 'count' => \App\Models\Page::whereBetween('created_at', [now()->startOfWeek(), now()->endOfWeek()])->count(), 'color' => 'info', 'icon' => 'calendar' ], 'this_month' => [ 'label' => 'Este Mes', 'count' => \App\Models\Page::whereMonth('created_at', now()->month)->whereYear('created_at', now()->year)->count(), 'color' => 'warning', 'icon' => 'calendar-2' ] ] ]) @push('css') @endpush @section('action-buttons') @endsection @section('table-headers') ID Página Slug/URL Fecha SEO con IA Acciones @endsection @section('table-body') @foreach($pages as $page) {{ $page->id }}
{{ $page->name }} @if($page->meta_title)
{{ Str::limit($page->meta_title, 50) }} @endif
/{{ $page->slug }} @if($page->content)
{{ Str::limit(strip_tags($page->content), 40) }} @endif
{{ \Carbon\Carbon::parse($page->created_at)->format('d/m/Y') }}
{{ \Carbon\Carbon::parse($page->created_at)->format('H:i') }} @if($page->ai_generated_at) Generado @endif
@endforeach @endsection @push('js') @endpush