@extends('layouts.app') @section('title', 'Customers') @section('content')

Customers

Manage your customer information

@if($user->isAdmin() && $agents->count() > 0) @endif
Add Customer
@if($customers->count() > 0) @if($user->isAdmin()) @endif @foreach($customers as $customer) @if($user->isAdmin()) @endif @endforeach
Name Phone Email LocationAgentOrders Total Spent Actions
{{ $customer->name }}
{{ $customer->phone }} {{ $customer->email ?? '-' }} {{ $customer->city ?? '-' }} {{ $customer->agent_name ?? '-' }} {{ $customer->total_orders }} RM {{ number_format($customer->total_spent, 2) }} Edit @if($customer->total_orders == 0)
@csrf @method('DELETE')
@endif
{{ $customers->appends(['search' => $search, 'agent_id' => $agentFilter])->links() }}
@else

No customers

Get started by adding a new customer.

@endif
@endsection