@extends('layouts.admin') @section('title','Communications') @section('heading','Communication delivery') @section('content')

Localized templates, preference-aware queued delivery, provider logs and safe test sends.

Create template

Use declared placeholders such as @{{ customer_name }}.

@csrf

Templates

{{ $templates->count() }} localized channel templates

@forelse($templates as $template)
@csrf @method('put')

{{ $template->name }}

{{ $template->key }} · {{ strtoupper($template->channel) }} · {{ $template->locale }}
{{ $template->is_active ? 'active' : 'inactive' }}
@empty
No templates configured.
@endforelse

Send controlled test

Recipient preferences, contact fields and active device registrations are enforced.

@csrf
@foreach(['in_app','push','email','sms'] as $channel)@endforeach

Create audience campaign

Audience membership is frozen when dispatch starts, making retries deterministic.

@csrf
@foreach(['customer','vendor','driver'] as $role)@endforeach
@foreach(['en','ar','hi'] as $locale)@endforeach
@foreach(['in_app','push','email','sms'] as $channel)@endforeach

Audience campaigns

Target, skip and channel-delivery analytics update from immutable recipient snapshots.

@forelse($campaigns as $campaign)@empty@endforelse
CampaignAudienceChannelsStatusAnalyticsScheduleControls
{{ $campaign->name }}
{{ $campaign->template_key }}
{{ collect($campaign->audience_roles)->join(', ') }}
{{ collect($campaign->audience_locales ?? ['all locales'])->join(', ') }}
{{ collect($campaign->channels)->join(', ') }}{{ $campaign->status }}Target {{ $campaign->analytics['targeted'] }} · Sent {{ $campaign->analytics['sent'] }} · Failed {{ $campaign->analytics['failed'] }} · Skipped {{ $campaign->analytics['skipped'] }}{{ $campaign->scheduled_at?->format('d M Y H:i') ?: 'Manual' }}
@foreach(($campaign->status==='paused' ? ['resume','cancel'] : (in_array($campaign->status,['draft','scheduled']) ? ['send','cancel'] : ($campaign->status==='processing' ? ['pause','cancel'] : []))) as $action)
@csrf
@endforeach
No audience campaigns.

Delivery log

Message bodies and recipient device tokens are never displayed.

@forelse($deliveries as $delivery)@empty@endforelse
RecipientTemplateChannel / providerStatusAttemptsProvider IDUpdated
{{ $delivery->user?->name }}
{{ $delivery->user?->email }}
{{ $delivery->template?->key ?: 'Deleted template' }}{{ strtoupper($delivery->channel) }}
{{ $delivery->provider ?: 'pending' }}
{{ $delivery->status }}{{ $delivery->attempts }}{{ $delivery->provider_message_id ?: '—' }}{{ $delivery->updated_at->diffForHumans() }}@if($delivery->status==='failed')
@csrf
@endif
No delivery attempts yet.
{{ $deliveries->links() }}
@endsection