@extends('layouts.app') @section('content')
{{-- Modern Header --}}

Bulk SMS Campaign

Send personalized SMS messages to multiple recipients instantly

@if(!empty($headers))
@csrf
@endif
{{-- Stats Grid --}}
File Format
XLSX
Excel & CSV Supported
Valid Numbers
{{ !empty($cleanData) ? number_format(count($cleanData)) : '0' }}
Ready to Send
Invalid Numbers
{{ !empty($problematicData) ? number_format(count($problematicData)) : '0' }}
Needs Correction
Success Rate
{{ !empty($cleanData) && !empty($problematicData) ? number_format((count($cleanData) / (count($cleanData) + count($problematicData))) * 100, 1) : '100' }}%
Data Quality Score
{{-- Progress Steps --}}
@if(empty($headers)) 1 @else @endif
Upload File
@if(empty($headers)) 2 @elseif(!empty($cleanData)) @else 2 @endif
Review Data
3
Compose & Send
{{-- Alerts --}} @if(session('success'))
{{ session('success') }}
@endif @if(session('error'))
{{ session('error') }}
@endif @if($errors->any())
    @foreach ($errors->all() as $error)
  • {{ $error }}
  • @endforeach
@endif {{-- Step 1: Upload File --}} @if(empty($headers))
@csrf

Upload Your Data File

Click to browse or drag & drop your Excel/CSV file here

Supported: .xlsx, .xls, .csv (Max 5MB)
@else {{-- Step 2 & 3: Compose & Send --}} @if(!empty($cleanData) && count($cleanData) > 0)
Ready to Send! You have {{ count($cleanData) }} valid phone numbers.
{{-- SMS Composer Form --}}
@csrf
Optional - For your reference
Optional - For your reference
{{-- SMS Composer --}}
Your message will appear here...
0/160 characters
@endif
{{-- Data Tables --}} @if(!empty($cleanData) && count($cleanData) > 0)

Valid Recipients ({{ count($cleanData) }})

@foreach($headers as $h) @endforeach @if(is_object($cleanData) && method_exists($cleanData, 'items')) @foreach($cleanData->items() as $row) @foreach($row as $cell) @endforeach @endforeach @else @foreach($cleanData as $row) @foreach($row as $cell) @endforeach @endforeach @endif
{{ strtoupper($h) }}
{{ $cell }}
{{ $cell }}
@if(is_object($cleanData) && method_exists($cleanData, 'links'))
Showing {{ $cleanData->firstItem() ?? 0 }} to {{ $cleanData->lastItem() ?? 0 }} of {{ $cleanData->total() }} entries
{{ $cleanData->appends(['problematic_page' => request('problematic_page')])->links('pagination::bootstrap-5') }}
@endif
@endif @if(!empty($problematicData) && count($problematicData) > 0)

Problematic Data ({{ count($problematicData) }})

These rows contain invalid phone numbers or missing data

@csrf
@foreach($headers as $h) @endforeach @if(is_object($problematicData) && method_exists($problematicData, 'items')) @foreach($problematicData->items() as $row) @foreach($row['data'] as $cell) @endforeach @endforeach @else @foreach($problematicData as $row) @foreach($row['data'] as $cell) @endforeach @endforeach @endif
{{ strtoupper($h) }}Issue
{{ $cell }} {{ $row['reason'] }}
{{ $cell }} {{ $row['reason'] }}
@endif @endif
{{-- Recent Campaigns --}} @if(!empty($recentHistory) && count($recentHistory) > 0)

Recent Campaigns

Your recent SMS campaigns from the last month

View All History
@if(is_object($recentHistory) && method_exists($recentHistory, 'items')) @foreach($recentHistory->items() as $history) @endforeach @else @foreach($recentHistory->take(5) as $history) @endforeach @endif
Campaign Message Recipients Date Actions
{{ $history->title ?? 'Untitled Campaign' }} {{ Str::limit($history->message, 50) }} {{ $history->number_of_recipients }} {{ $history->sent_at ? $history->sent_at->format('M d, Y') : 'N/A' }} Load
{{ $history->title ?? 'Untitled Campaign' }} {{ Str::limit($history->message, 50) }} {{ $history->number_of_recipients }} {{ $history->sent_at ? $history->sent_at->format('M d, Y') : 'N/A' }} Load
@if(is_object($recentHistory) && method_exists($recentHistory, 'links'))
Showing {{ $recentHistory->firstItem() ?? 0 }} to {{ $recentHistory->lastItem() ?? 0 }} of {{ $recentHistory->total() }} campaigns
{{ $recentHistory->links('pagination::bootstrap-5') }}
@endif
@endif
@endsection