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

Customers

Manage all customer records and transactions

Add Customer

Total Customers

{{ number_format($stats['total_customers']) }}

VIP Customers

{{ number_format($stats['total_vip']) }}

Registered

{{ number_format($stats['total_registered']) }}

Total Revenue

RM {{ number_format($stats['total_revenue'], 2) }}

@if($customers->count() > 0)
@foreach($customers as $customer) @endforeach
Customer Contact Type Channels Orders Bookings Total Spent Last Purchase Actions
{{ $customer->name }}
{{ $customer->email }}
@if($customer->phone) {{ $customer->phone }} @else - @endif {{ ucfirst($customer->customer_type) }} @if(!empty($customer->channels)) @foreach($customer->channels as $channel) @php $channelBadge = match($channel) { 'ecommerce' => ['class' => 'primary', 'icon' => 'cart', 'label' => 'E-commerce'], 'booking' => ['class' => 'success', 'icon' => 'calendar-check', 'label' => 'Booking'], 'payment_form' => ['class' => 'info', 'icon' => 'credit-card', 'label' => 'Payment'], default => ['class' => 'secondary', 'icon' => 'question', 'label' => ucfirst($channel)] }; @endphp {{ $channelBadge['label'] }} @endforeach @else - @endif {{ $customer->total_orders }} {{ $customer->total_bookings }} RM {{ number_format($customer->total_spent, 2) }} @if($customer->last_purchase_at) {{ $customer->last_purchase_at->format('M d, Y') }} @else Never @endif View
{{ $customers->withQueryString()->links() }}
@else

No customers found

@if(request('search') || request('customer_type') || request('channel')) Clear Filters @endif
@endif
@endsection