@extends('layouts.dashboard') @section('title', 'Message Logs') @section('page-title', 'Message Logs (SMS & WhatsApp)') @section('content')
Clear
Showing {{ $smsLogs->count() }} of {{ $smsLogs->total() }} message logs
@forelse($smsLogs as $sms) @empty @endforelse
ID User Channel Phone / Contact Message Status Sent At
{{ $sms->id }} @if($sms->user) {{ $sms->user->name }} @else N/A @endif @if(($sms->channel ?? 'sms') == 'whatsapp') WhatsApp @else SMS @endif
{{ $sms->phone_number }}
@if($sms->contact_name) {{ $sms->contact_name }} @endif
{{ Str::limit($sms->message, 50) }} @php $statusClass = match(strtolower($sms->status)) { 'sent', 'delivered' => 'bg-success', 'pending' => 'bg-warning', 'failed' => 'bg-danger', default => 'bg-secondary', }; @endphp {{ ucfirst($sms->status) }} {{ $sms->sent_at?->format('M d, Y H:i:s') ?? 'N/A' }}
No message logs found
{{ $smsLogs->withQueryString()->links() }}
@endsection