@extends('layouts.admin') @section('title', 'Notificações por E-mail') @section('breadcrumb') Configurações / Notificações @endsection @section('content')
{{-- ─── Configurações ─── --}}
@csrf @method('PUT') {{-- Notificações Ativas --}}
Notificações Automáticas
@php $notifs = [ [ 'key' => 'notify_reservation_confirmed', 'icon' => 'check-circle', 'color' => '#22c55e', 'title' => 'Confirmação de Reserva', 'desc' => 'Enviado imediatamente quando uma reserva é criada/confirmada.', 'badge' => 'Automático', ], [ 'key' => 'notify_checkin_reminder', 'icon' => 'calendar-check', 'color' => '#6366f1', 'title' => 'Lembrete de Check-in', 'desc' => 'Enviado 24 horas antes da chegada do hóspede (diário às 10h).', 'badge' => 'Agendado', ], [ 'key' => 'notify_checkout_receipt', 'icon' => 'receipt', 'color' => '#f59e0b', 'title' => 'Extrato de Checkout', 'desc' => 'Enviado automaticamente quando o check-out é realizado.', 'badge' => 'Automático', ], ]; @endphp @foreach($notifs as $n)
{{ $n['title'] }} {{ $n['badge'] }}
{{ $n['desc'] }}
{{-- Toggle switch --}}
@endforeach
{{-- SMTP --}}
@csrf @method('PUT')
Configurações SMTP (opcional — usa o padrão do sistema se vazio)
{{-- ─── Sidebar: Teste + Info ─── --}}
{{-- Enviar email de teste --}}
Testar E-mail
@csrf

💡 Em ambiente local com MAIL_MAILER=log, o e-mail fica salvo em storage/logs/laravel.log. Para usar Gmail ou outro SMTP, configure acima.

{{-- Status do Mailer --}}
Status do Sistema de E-mail
@php $mailer = config('mail.default'); $mailerColors = ['log'=>'#f59e0b', 'smtp'=>'#22c55e', 'mailgun'=>'#3b82f6']; $c = $mailerColors[$mailer] ?? '#6b7280'; @endphp
Mailer ativo: {{ strtoupper($mailer) }}
From: {{ config('mail.from.address') }}
Host: {{ config('mail.mailers.smtp.host', '—') }}
Porta: {{ config('mail.mailers.smtp.port', '—') }}
@if($mailer === 'log')
⚠ Mailer em modo LOG. Os e-mails não são enviados — verifique storage/logs/laravel.log.
@endif
@push('scripts') @endpush @endsection