@extends('layouts.app') @section('content')

Bulk SMS Campaign

Create and send SMS messages to multiple recipients

History @if(!empty($headers))
@csrf
@endif
@if(!empty($headers))
Valid Numbers
@if(!empty($cleanData)) @if(is_object($cleanData) && method_exists($cleanData, 'total')) {{ number_format($cleanData->total()) }} @else {{ number_format(count($cleanData)) }} @endif @else 0 @endif
Invalid Numbers
@if(!empty($problematicData)) @if(is_object($problematicData) && method_exists($problematicData, 'total')) {{ number_format($problematicData->total()) }} @else {{ number_format(count($problematicData)) }} @endif @else 0 @endif
Success Rate
@php $cleanTotal = 0; $problematicTotal = 0; if(!empty($cleanData)) { $cleanTotal = is_object($cleanData) && method_exists($cleanData, 'total') ? $cleanData->total() : count($cleanData); } if(!empty($problematicData)) { $problematicTotal = is_object($problematicData) && method_exists($problematicData, 'total') ? $problematicData->total() : count($problematicData); } $totalRecords = $cleanTotal + $problematicTotal; $successRate = $totalRecords > 0 ? ($cleanTotal / $totalRecords) * 100 : 0; @endphp {{ number_format($successRate, 1) }}%
@endif
1
Upload File
2
Validate Data
3
Phone Column
4
Compose SMS
5
Review & Send
Step 1: Upload File or Select Campaign
{{-- Status Messages --}} @if(session('success'))
Success! {{ session('success') }}
@endif @if(session('error'))
{{ session('error') }}
@endif @if($errors->any())
    @foreach ($errors->all() as $error)
  • {{ $error }}
  • @endforeach
@endif {{-- Failed Sends Summary --}} @if(session('failedSendsSummary') && count(session('failedSendsSummary')) > 0)
Warning: Some SMS could not be queued
    @foreach(session('failedSendsSummary') as $failed)
  • Phone: {{ $failed['phone'] ?? 'N/A' }} - Reason: {{ $failed['reason'] ?? 'Unknown' }}
  • @endforeach
@csrf
@endif {{-- STEP 1: Upload File or Select Recent Campaign --}}
@csrf
Upload Data File

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

Supported formats: .xlsx, .xls, .csv (Max 5MB)
@if(!empty($recentHistory) && count($recentHistory) > 0)

Load from recent campaigns

@endif
{{-- STEP 2: Review Data --}}
{{-- Valid Recipients --}} @if(!empty($cleanData) && count($cleanData) > 0)
Valid Recipients ({{ is_object($cleanData) && method_exists($cleanData, 'total') ? $cleanData->total() : 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'))
{{ $cleanData->appends(['problematic_page' => request('problematic_page')])->links('pagination::bootstrap-5') }}
@endif
@endif {{-- Problematic Data --}} @if(!empty($problematicData) && count($problematicData) > 0)
Problematic Data ({{ is_object($problematicData) && method_exists($problematicData, 'total') ? $problematicData->total() : count($problematicData) }})
These records have issues
@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'] }}
@if(is_object($problematicData) && method_exists($problematicData, 'links'))
{{ $problematicData->appends(['clean_page' => request('clean_page')])->links('pagination::bootstrap-5') }}
@endif
@endif
{{-- STEP 3: Select Phone Column --}} {{-- STEP 4: Compose SMS --}} {{-- STEP 5: Review & Send --}}
{{-- JavaScript --}} @endsection