@extends('layouts.app') @section('content')
{{-- ── Header ── --}}
Communication Logs
SMS Logs
{{-- ── Stat Strip ── --}} @php $totalLogs = $logs->total(); $successLogs = $logs->getCollection()->where('status', 'success')->count(); $failedLogs = $logs->getCollection()->where('status', 'failed')->count(); @endphp
Total Logs
{{ number_format($totalLogs) }}
Delivered
{{ number_format($successLogs) }}
Failed
{{ number_format($failedLogs) }}
{{-- ── Toolbar ── --}}
{{-- ── Table Card ── --}}
All Messages
@forelse($logs as $log) {{-- ID --}} {{-- Phone --}} {{-- Type --}} {{-- Status --}} {{-- Message --}} {{-- Date --}} @empty @endforelse
ID Phone Type Status Message Sent At
#{{ str_pad($log->id, 5, '0', STR_PAD_LEFT) }} {{ $log->phone }} {{ $log->message_type ?? '—' }} @if($log->status == 'success') Delivered @else Failed @endif {{ $log->message }}
{{ \Carbon\Carbon::parse($log->sent_at)->format('d M Y') }}
{{ \Carbon\Carbon::parse($log->sent_at)->format('h:i A') }}

No SMS logs found

Messages will appear here once they are sent.

{{-- Pagination --}} @if($logs->hasPages())
Showing {{ $logs->firstItem() }}–{{ $logs->lastItem() }} of {{ $logs->total() }} logs {{ $logs->links() }}
@endif
@endsection