{{ $shopName }} 👥 Customer List Report
Generated: {{ now()->format('d M Y, h:i A') }}  |  Total Customers: {{ $customers->count() }}
@php $sl = 1; $grandTotal = 0; @endphp @forelse($customers as $customer) @php $totalSpent = $customer->orders->whereNotIn('status', ['cancelled'])->sum('total_amount'); $grandTotal += $totalSpent; $lastOrder = $customer->orders->sortByDesc('created_at')->first(); @endphp @empty @endforelse @if($customers->count() > 0) @endif
# Name Phone Email Orders Total Spent (à§³) Last Order Joined
{{ $sl++ }} {{ $customer->name }} {{ $customer->phone ?? '—' }} {{ $customer->orders->count() }} orders {{ number_format($totalSpent, 0) }} @if($lastOrder) {{ $lastOrder->created_at->format('d/m/Y') }}
{{ ucfirst($lastOrder->status) }}
@else — @endif
{{ $customer->created_at->format('d/m/Y') }}
No customers found.
Grand Total Spent ({{ $customers->count() }} customers): à§³{{ number_format($grandTotal, 0) }}