@extends('mainlayout.layout') @section('title', config('app.name') . ' | Customers') @section('topbar-search', 'enabled') @section('content') @php $customersIndexUrl = request()->routeIs('support.customers.index') ? route('support.customers.index') : url('/customers/view_customer'); @endphp
Customer management

Customers

Find customer accounts and understand their order activity.

Total customers{{ number_format($metrics['total']) }}
Customers with orders{{ number_format($metrics['with_orders']) }}
Added in 30 days{{ number_format($metrics['recent']) }}
Portfolio order valueTZS {{ number_format($metrics['order_value']) }}

{{ $searchterm !== '' ? 'Matching customers' : 'Recent customers' }}

{{ $searchterm !== '' ? 'All matching customers, with adjustable page sizes.' : 'Newest customers first. Choose how many results to show per page.' }}

@if($customers->total()) {{ number_format($customers->firstItem()) }}–{{ number_format($customers->lastItem()) }} of {{ number_format($customers->total()) }} @else 0 customers @endif
Loading customers…
@forelse($customers as $customer) @php $customerUrl = request()->routeIs('support.customers.index') ? route('support.customers.show', $customer) : url('/customers/view_customer/' . encrypt($customer->uid)); $customerName = trim($customer->first_name . ' ' . $customer->middle_name . ' ' . $customer->last_name); @endphp @empty @endforelse
CustomerCustomer IDContactOrdersOrder valueRegistered
{{ $customerName ?: 'Unnamed customer' }}{{ $customer->source ?: 'Miliki customer' }} {{ $customer->userID ?: $customer->uid }} {{ $customer->phone ?: 'Phone not available' }}{{ $customer->email ?: 'Email not available' }} {{ number_format((int) $customer->orders_count) }} TZS {{ number_format((int) $customer->order_value) }} {{ optional($customer->created_at)->format('d M Y') ?: '—' }}{{ optional($customer->created_at)->format('H:i') }}
No customers match the current search.
@include('partials.directory-pagination', ['paginator' => $customers])
@endsection @push('scripts') @endpush