@extends('layouts.app') @section('title', 'Customers') @section('breadcrumb') @endsection @section('content') {{-- Stats Cards --}}
{{ $customers->total() }}
Total Customers
{{ $customers->where('is_active', true)->count() }}
Active Customers
Rs. {{ number_format($customers->sum('total_purchases'), 0) }}
Total Purchases
{{ number_format($customers->sum('loyalty_points'), 0) }}
Total Loyalty Points
{{-- Filters --}}
{{-- Customers Table --}}
All Customers
{{ $customers->total() }} customers
@forelse($customers as $customer) @empty @endforelse
Customer Contact Group Total Purchases Loyalty Points Status Actions
{{ strtoupper(substr($customer->name, 0, 1)) }}
{{ $customer->name }}
@if($customer->city) {{ $customer->city }} @endif
@if($customer->phone)
{{ $customer->phone }}
@endif @if($customer->email) {{ $customer->email }} @endif
@if($customer->group) {{ $customer->group->name }} @else - @endif Rs. {{ number_format($customer->total_purchases, 2) }}
{{ $customer->total_orders }} orders
{{ number_format($customer->loyalty_points) }} @if($customer->loyalty_tier)
{{ ucfirst($customer->loyalty_tier) }} @endif
@if($customer->is_active) Active @else Inactive @endif
@csrf @method('DELETE')

No customers found

Add First Customer
@if($customers->hasPages())
{{ $customers->links() }}
@endif
@endsection