@extends('layouts.app') @section('title', __('dashboard.sidebar_marketing')) @section('page_heading', __('dashboard.sidebar_marketing')) @section('content') @php $customerCount = $customers->total(); $reservationValue = $customers->getCollection()->sum('customer_reservations_sum_final_total'); $purchaseValue = $customers->getCollection()->sum('customer_purchases_sum_final_total'); $eventCount = $customers->getCollection()->sum(fn($c) => $c->customer_reservations->count()); @endphp {{-- KPIs --}}
| {{ $h }} | @endforeach|||||
|---|---|---|---|---|---|
|
{{ $customer->name }}
#{{ $customer->id }}
|
@foreach(array_filter([$customer->phone, $customer->other_phone]) as $phone) @php $clean = '2'.preg_replace('/^0/','',$phone); @endphp @endforeach @if(!$customer->phone && !$customer->other_phone)—@endif | {{ trim(($customer->governorate ? $customer->governorate.' - ' : '').($customer->address ?? '')) ?: '—' }} |
{{ number_format($customer->customer_reservations_sum_final_total ?? 0, 0) }}
ج.م
|
{{ number_format($customer->customer_purchases_sum_final_total ?? 0, 0) }}
ج.م
|
@foreach($customer->customer_reservations as $r)
{{ $r->event_date->format('Y-m-d') }}
· {{ Str::limit($r->product->name ?? 'N/A', 12) }}
@endforeach
|