{{-- resources/views/settings/notifications.blade.php --}} @extends('layouts.app') @section('title', 'Notification Templates') @section('page_title', 'Notification Templates') @section('page_subtitle', 'Customise email, SMS and WhatsApp messages') @section('content') @include('settings.partials.nav') @php $channelColors = [ 'email' => ['bg'=>'#dbeafe','color'=>'#1e40af','icon'=>'bi-envelope'], 'sms' => ['bg'=>'#d1fae5','color'=>'#065f46','icon'=>'bi-chat-dots'], 'whatsapp' => ['bg'=>'#dcfce7','color'=>'#166534','icon'=>'bi-whatsapp'], ]; $eventLabels = [ 'welcome' => 'Welcome', 'reservation_confirmed' => 'Reservation Confirmed', 'check_in_reminder' => 'Check-in Reminder', 'check_out_reminder' => 'Check-out Reminder', 'payment_received' => 'Payment Received', 'invoice_issued' => 'Invoice Issued', 'reservation_cancelled' => 'Reservation Cancelled', 'balance_due_reminder' => 'Balance Due Reminder', 'subscription_expiring' => 'Subscription Expiring', ]; @endphp @foreach($templates as $event => $channelTemplates)
{{ $eventLabels[$event] ?? ucfirst(str_replace('_', ' ', $event)) }}
@foreach($channelTemplates as $template) @php $cc = $channelColors[$template->channel] ?? $channelColors['email']; @endphp {{ ucfirst($template->channel) }} @if(!$template->is_active) (off) @endif @endforeach
@foreach($channelTemplates as $template) @php $cc = $channelColors[$template->channel] ?? $channelColors['email']; @endphp
{{ ucfirst($template->channel) }}
@csrf
@csrf @method('PUT') @if($template->channel === 'email')
id}", $template->subject) }}" placeholder="Email subject line">
@endif
Variables: @php echo '{{guest_name}}, {{reservation_ref}}, {{check_in_date}}, {{property_name}}' @endphp
is_active ? 'checked' : '' }}>
@endforeach
@endforeach @if($templates->isEmpty())

No notification templates

Run the seeder to create default templates

php artisan db:seed --class=NotificationTemplateSeeder
@endif @endsection