@extends('admin.layouts.index-template', [ 'pageTitle' => 'Consultas de Contacto', 'items' => $contacts, 'icon' => 'mail', 'module' => 'Contactos', 'createRoute' => null, 'indexRoute' => route('admin.contacts.index'), 'searchPlaceholder' => 'Buscar por nombre, email o asunto...', 'emptyIcon' => 'envelope', 'emptyTitle' => 'No hay consultas', 'emptyMessage' => 'Cuando los clientes envíen consultas por el formulario de contacto, aparecerán aquí', 'stats' => [ 'all' => [ 'label' => 'Total', 'count' => $contacts->total(), 'color' => 'primary', 'icon' => 'mail' ], 'today' => [ 'label' => 'Hoy', 'count' => \App\Models\ContactInquiry::whereDate('created_at', today())->count(), 'color' => 'success', 'icon' => 'calendar-event' ], 'this_week' => [ 'label' => 'Esta Semana', 'count' => \App\Models\ContactInquiry::whereBetween('created_at', [now()->startOfWeek(), now()->endOfWeek()])->count(), 'color' => 'info', 'icon' => 'calendar' ], 'this_month' => [ 'label' => 'Este Mes', 'count' => \App\Models\ContactInquiry::whereMonth('created_at', now()->month)->whereYear('created_at', now()->year)->count(), 'color' => 'warning', 'icon' => 'calendar-2' ] ] ]) @push('css') @endpush @section('action-buttons') Exportar a Excel @endsection @section('table-headers') ID Nombre Correo Teléfono Asunto Mensaje Fecha Acciones @endsection @section('table-body') @foreach($contacts as $contact) {{ $contact->id }} {{ $contact->name }} {{ $contact->email }} @if($contact->phone) {{ $contact->phone }} @else - @endif {{ Str::limit($contact->subject, 30) }} {{ Str::limit($contact->message, 50) }} {{ \Carbon\Carbon::parse($contact->created_at)->format('d/m/Y') }}
{{ \Carbon\Carbon::parse($contact->created_at)->format('H:i') }}
@endforeach @endsection @push('js') @endpush