@extends('layouts.clivax') @section('content')
Total Customers

{{ $customers->count() }}

Active Customers

{{ $customers->where('status', 'active')->count() }}

Total Revenue

${{ number_format($customers->sum('total_revenue'), 2) }}

Avg. Value

${{ number_format($customers->avg('total_revenue'), 2) }}

@forelse($customers as $customer) @empty @endforelse
Name Phone Email Type Revenue Shipments Status Actions
{{ strtoupper(substr($customer->name, 0, 1)) }}
{{ $customer->name }} @if($customer->company_name)
{{ $customer->company_name }} @endif
{{ $customer->phone }} {{ $customer->email ?? 'N/A' }} {{ ucfirst($customer->customer_type) }} ${{ number_format($customer->total_revenue, 2) }} @if($customer->total_shipments > 0)
Avg: ${{ number_format($customer->average_shipment_value, 2) }} @endif
{{ $customer->total_shipments }} @if($customer->last_shipment_date)
Last: {{ $customer->last_shipment_date->format('M d, Y') }} @endif
{{ ucfirst($customer->status) }}
Edit Activity
@csrf @method('DELETE')

No customers found

@if($customers->hasPages())
Showing {{ $customers->firstItem() }} to {{ $customers->lastItem() }} of {{ $customers->total() }} entries
{{ $customers->links() }}
@endif
@endsection @push('styles') @endpush