Filter customers by purchased products, spending, view active cart items, and send offer SMS alerts.
| pluck('id')->toArray()) }}] : []; " class="text-[#f57224]"> | Customer Info | Contact Phone | Purchased Products (History) | Orders & Spent | Actions |
|---|---|---|---|---|---|
|
{{ strtoupper(substr($customer->name, 0, 1)) }}
{{ $customer->name }}
{{ $customer->email }}
|
{{ $customer->phone ?? 'N/A' }} |
@php
$items = [];
foreach($customer->orders as $o) {
foreach($o->items as $it) {
if($it->product) {
$items[$it->product->id] = $it->product->name;
}
}
}
@endphp
@if(count($items) > 0)
@foreach(array_slice($items, 0, 3) as $pid => $pname)
• {{ $pname }}
@endforeach
@if(count($items) > 3)
+{{ count($items) - 3 }} more
@endif
@else
No purchase recorded
@endif
|
{{ $customer->orders->count() }} Orders
৳{{ number_format($customer->orders->where('status', '!=', 'cancelled')->sum('total_amount'), 0) }}
|
||
| No customers found. | |||||