@extends('layouts.app') @section('title', 'SMS History') @php $tone = [ 'Delivered' => 'bg-emerald-500/15 text-emerald-700', 'Sent' => 'bg-sky-500/15 text-sky-700', 'Queued' => 'bg-amber-500/15 text-amber-700', 'Failed' => 'bg-red-500/15 text-red-700', ]; @endphp @section('content')

SMS History

Every SMS and WhatsApp message sent from the communication module

Export CSV
@foreach ([['', 'All channels', \App\Models\MessageLog::count()], ['sms', 'SMS', $counts['sms'] ?? 0], ['whatsapp', 'WhatsApp', $counts['whatsapp'] ?? 0]] as [$key, $label, $n]) {{ $label }} {{ number_format($n) }} @endforeach
Failed {{ number_format(\App\Models\MessageLog::where('status', 'Failed')->count()) }}
@if ($status !== '' || $q !== '') Reset @endif
@forelse ($logs as $l) @empty @endforelse
Channel Recipient Message Chars Segments Sender Status Sent
{{ $l->isWhatsApp() ? 'WhatsApp' : 'SMS' }} {{ $l->recipient }} {{ $l->phone }} {{ $l->message }} {{ $l->chars }} {{ $l->segments }} {{ $l->sender }} {{ $l->status }} {{ $l->sent_at->format('d M Y H:i') }}
No messages match these filters.
{{ $logs->links() }}
@endsection