@extends('layouts.app') @section('title', 'Email Templates') @section('page-title', 'Email Templates') @section('content') {{-- Global Email Settings --}}
Global Email Settings
@csrf @method('PATCH')
When disabled, no automated emails are sent.
{{-- Send Test Email --}}
Send Test Email
@csrf
Placeholders will be filled with sample values like [placeholder_name].
{{-- Templates --}}
Email Templates

Edit subject and body. Use @{{token_name}} tokens shown in each template.

@foreach($templates as $tpl)
{{ $tpl->name }} @php $badgeClass = $tpl->is_active ? 'bg-success bg-opacity-10 text-success' : 'bg-secondary bg-opacity-10 text-secondary'; @endphp {{ $tpl->is_active ? 'Active' : 'Inactive' }}
@csrf @method('PATCH')
@if($tpl->placeholders)
Available tokens: @foreach($tpl->placeholders as $token) {!! '{{' . e($token) . '}}' !!} @endforeach
@endif
@csrf @method('PATCH')
@endforeach {{-- Recent Email Log --}}
Recent Email Log
@forelse($recentLogs as $log) @empty @endforelse
Recipient Template Subject Status Sent At
{{ $log->recipient_email }} {{ $log->template_key }} {{ $log->subject }} @if($log->status === 'sent') Sent @else Failed @endif {{ $log->sent_at->format('d M Y, h:i A') }}
No emails sent yet.
@endsection