@php use App\Models\TestSmsLog; $ids = $messages->getCollection()->map(fn ($m) => (string) $m->Id)->values(); $count = fn ($s) => (int) ($statusCounts[$s] ?? 0); $importErrors = $errors->hasAny(['file', 'template', 'bitly_url_id', 'sender_mobile', 'campaign', 'user_id']); $linkUrls = $bitlyLinks->mapWithKeys(fn ($l) => [(string) $l->id => $l->url])->all(); @endphp Export @include('sms.partials.tabs')
Also: Cancelled · {{ number_format($count('-1')) }} Deleted · {{ number_format($count('6')) }} DND · {{ number_format($dndCounts['1'] ?? 0) }} Non-DND · {{ number_format($dndCounts['2'] ?? 0) }} DND not checked · {{ number_format($total - ($dndCounts['1'] ?? 0) - ($dndCounts['2'] ?? 0) - ($dndCounts['-1'] ?? 0)) }}
selected
@csrf
@foreach ([TestSmsLog::STATUS_NEW => ['Re-queue', 'heroicon-m-arrow-path'], TestSmsLog::STATUS_CANCELLED => ['Cancel', 'heroicon-m-pause-circle']] as $value => [$label, $icon])
@csrf
@endforeach
@csrf @method('DELETE')
@if ($messages->isEmpty()) @else
@foreach ($messages as $m) @php([$dndLabel, $dndBadge] = TestSmsLog::dndLabel($m->DndStatus)) @endforeach
Message Sent SIM
@include('sms.partials.status', ['value' => $m->MessageStatusId])
{{ $m->Number ?: '—' }}
@if (trim((string) $m->Name) !== '' && strlen(trim($m->Name)) > 1)
{{ $m->Name }}
@endif
@if ($m->Campaign) {{ \Illuminate\Support\Str::limit($m->Campaign, 28) }} @else — @endif {{ $m->user_name ?? ($m->UserId ? '#'.$m->UserId : '—') }} {{ $dndLabel }} @if ($m->DndCheckDate)
{{ $m->DndCheckDate }}
@endif
{{ $m->SentOnDate ?: '—' }} @if ($m->TimeTaken)
{{ $m->TimeTaken }}
@endif
{{ $m->SimName ?: '—' }}
@endif
@include('sms.partials.message-modal') {{-- Import campaign --}}
@csrf
@error('file')

{{ $message }}

@enderror

CSV or Excel with a header row. Columns used: Number (or Mobile), Name / SMS Name, Car / Model, and optionally Message. Numbers that are not valid 10-digit mobiles are kept as “Invalid number”.

Message
@foreach (['{name}', '{car}', '{mobile}', '{link}'] as $tag) @endforeach
@error('template')

{{ $message }}

@enderror
@error('bitly_url_id')

{{ $message }}

@enderror

Manage links under Bitly links.

@error('sender_mobile')

{{ $message }}

@enderror
Preview

characters · SMS part(s) per recipient