@extends('layouts.admin') @section('header', 'Marketing Campaign Management') @section('content')

Marketing Campaigns

Manage your email, SMS, and WhatsApp marketing campaigns from one place

Email Campaigns

{{ number_format($emailStats['total'] ?? 0) }} Total
{{ number_format($emailStats['sent'] ?? 0) }} Sent
{{ number_format($emailStats['scheduled'] ?? 0) }} Scheduled
{{ number_format($emailStats['draft'] ?? 0) }} Draft
View All Email Campaigns

SMS Campaigns

{{ number_format($smsStats['total'] ?? 0) }} Total
{{ number_format($smsStats['sent'] ?? 0) }} Sent
{{ number_format($smsStats['scheduled'] ?? 0) }} Scheduled
{{ number_format($smsStats['draft'] ?? 0) }} Draft
View All SMS Campaigns

WhatsApp Campaigns

{{ number_format($whatsappStats['total'] ?? 0) }} Total
{{ number_format($whatsappStats['sent'] ?? 0) }} Sent
{{ number_format($whatsappStats['scheduled'] ?? 0) }} Scheduled
{{ number_format($whatsappStats['draft'] ?? 0) }} Draft
View All WhatsApp Campaigns

Recent Email Campaigns

View All
@forelse ($emailCampaigns as $campaign) @empty @endforelse
Campaign Subject Status Recipients Open Rate Actions
{{ $campaign->name }}
{{ $campaign->created_at->format('M d, Y') }}
{{ Str::limit($campaign->subject, 40) }}
@php $statusConfig = [ 'draft' => ['bg' => 'bg-gray-100', 'text' => 'text-gray-800', 'icon' => 'fas fa-edit'], 'scheduled' => ['bg' => 'bg-blue-100', 'text' => 'text-blue-800', 'icon' => 'fas fa-clock'], 'sending' => ['bg' => 'bg-yellow-100', 'text' => 'text-yellow-800', 'icon' => 'fas fa-spinner'], 'sent' => ['bg' => 'bg-green-100', 'text' => 'text-green-800', 'icon' => 'fas fa-check'], 'failed' => ['bg' => 'bg-red-100', 'text' => 'text-red-800', 'icon' => 'fas fa-exclamation-triangle'] ]; $status = $statusConfig[$campaign->status] ?? $statusConfig['draft']; @endphp {{ ucfirst($campaign->status) }}
{{ number_format($campaign->recipient_count ?? 0) }}
{{ $campaign->open_rate ?? 0 }}%

No email campaigns found

Recent SMS Campaigns

View All
@forelse ($smsCampaigns as $campaign) @empty @endforelse
Campaign Sender ID Status Recipients Delivery Rate Actions
{{ $campaign->name }}
{{ $campaign->created_at->format('M d, Y') }}
{{ $campaign->sender_id }}
@php $statusConfig = [ 'draft' => ['bg' => 'bg-gray-100', 'text' => 'text-gray-800', 'icon' => 'fas fa-edit'], 'scheduled' => ['bg' => 'bg-blue-100', 'text' => 'text-blue-800', 'icon' => 'fas fa-clock'], 'sending' => ['bg' => 'bg-yellow-100', 'text' => 'text-yellow-800', 'icon' => 'fas fa-spinner'], 'sent' => ['bg' => 'bg-green-100', 'text' => 'text-green-800', 'icon' => 'fas fa-check'], 'failed' => ['bg' => 'bg-red-100', 'text' => 'text-red-800', 'icon' => 'fas fa-exclamation-triangle'] ]; $status = $statusConfig[$campaign->status] ?? $statusConfig['draft']; @endphp {{ ucfirst($campaign->status) }}
{{ number_format($campaign->recipient_count ?? 0) }}
{{ $campaign->delivery_rate ?? 0 }}%

No SMS campaigns found

Recent WhatsApp Campaigns

View All
@forelse ($whatsappCampaigns as $campaign) @empty @endforelse
Campaign Media Type Status Recipients Read Rate Actions
@if($campaign->media_type) @switch($campaign->media_type) @case('image') @break @case('video') @break @case('document') @break @case('audio') @break @default @endswitch @else @endif
{{ $campaign->name }}
{{ $campaign->created_at->format('M d, Y') }}
@if($campaign->media_type) @switch($campaign->media_type) @case('image') 📷 Image @break @case('video') 🎥 Video @break @case('document') 📄 Document @break @case('audio') 🎵 Audio @break @default {{ ucfirst($campaign->media_type) }} @endswitch @else 💬 Text Only @endif @php $statusConfig = [ 'draft' => ['bg' => 'bg-gray-100', 'text' => 'text-gray-800', 'icon' => 'fas fa-edit'], 'scheduled' => ['bg' => 'bg-blue-100', 'text' => 'text-blue-800', 'icon' => 'fas fa-clock'], 'sending' => ['bg' => 'bg-yellow-100', 'text' => 'text-yellow-800', 'icon' => 'fas fa-spinner'], 'sent' => ['bg' => 'bg-green-100', 'text' => 'text-green-800', 'icon' => 'fas fa-check'], 'failed' => ['bg' => 'bg-red-100', 'text' => 'text-red-800', 'icon' => 'fas fa-exclamation-triangle'] ]; $status = $statusConfig[$campaign->status] ?? $statusConfig['draft']; @endphp {{ ucfirst($campaign->status) }}
{{ number_format($campaign->recipient_count ?? 0) }}
{{ $campaign->read_rate ?? 0 }}%

No WhatsApp campaigns found

@endsection