@extends('Backend.Layouts.app') @php $page_title = 'Customers'; $customerCount = $customers->count(); @endphp @section('content')
{{-- Page Heading --}}

Customers

Monitor your customers, orders and purchase history.

{{ number_format($customerCount) }} Customers
{{-- Summary Cards --}}
Total Customers
{{ number_format($customerCount) }}
Total Orders
—
Total Items Ordered
—
Total Amount Ordered
—
{{-- Customers Table --}}
Customer Directory

All businesses that have placed orders.

@forelse($customers as $school => $info) @php $phone = latest_order_school_contact($school); $orders = total_order_by_school($school); $quantity = total_qty_ordered_by_school($school); $amount = total_amount_paid_by_school($school); $lastOrdered = last_ordered_date_by_school($school); @endphp @empty @endforelse
Business Contact Phone Total Orders Total Qty Ordered Total Amount Ordered Last Ordered Date
{{ $school }}
{{ $phone ?: 'Not available' }} {{ number_format((float) $orders) }} {{ number_format((float) $quantity) }} {{ is_numeric($amount) ? '₦' . number_format((float) $amount, 2) : $amount }} {{ $lastOrdered ?: 'No order date' }}
No customers yet

Customers will appear here once they place orders.

@stop @push('scripts') @endpush