@extends('layouts.admin') @section('content')
{{ number_format($totalCustomers) }}
{{ number_format($newCustomers) }}
{{ number_format($topCustomers->count()) }}
@if($customer->phone){{ $customer->phone }}@endif @if($customer->email && $customer->phone) • @endif @if($customer->email){{ $customer->email }}@endif
Rs.{{ number_format($customer->total_spent, 2) }}
{{ $customer->total_transactions }} trans
No data available
Customers with loyalty points
| Customer | Contact | Loyalty Points | Total Spent | Last Purchase |
|---|---|---|---|---|
| {{ $customer->name }} |
@if($customer->phone)
{{ $customer->phone }} @endif @if($customer->email) {{ $customer->email }} @endif |
{{ number_format($customer->loyalty_points) }} points | @php $totalSpent = $customer->sales()->where('status', 'completed')->sum('total'); @endphp Rs.{{ number_format($totalSpent, 2) }} | @php $lastSale = $customer->sales()->where('status', 'completed')->latest()->first(); @endphp @if($lastSale) {{ $lastSale->created_at->diffForHumans() }} @else Never @endif |