@extends('backend.layout.exposcale') @section('page_title', 'Customers') @section('topbar_actions') @endsection @section('content')
Quick rank:
@forelse($users as $user) @php $initials = strtoupper(substr($user->first_name ?? '', 0, 1) . substr($user->last_name ?? '', 0, 1)); if (!$initials) $initials = strtoupper(substr($user->name ?? 'U', 0, 2)); $fullName = trim(($user->first_name ?? '') . ' ' . ($user->last_name ?? '')); if (!$fullName) $fullName = $user->name ?? 'Unknown User'; $company = $user->company ?? 'No Company'; $adAccounts = $user->adAccounts; $totalAccounts = $adAccounts->count(); $activeAccounts = $adAccounts->whereIn('status', ['approved', 'active', 'accepted'])->count(); $disabledAccounts = $adAccounts->whereIn('status', ['disabled', 'suspended', 'inactive', 'rejected', 'deleted', 'banned'])->count(); $processingAccounts = $adAccounts->whereIn('status', ['pending', 'processing', 'in_review', 'review'])->count(); $totalBalance = $adAccounts->sum('balance'); @endphp @empty @endforelse
Customer Plan Total Top-ups ↕ Ad Accounts Current Balance ↕ Company
@if(!empty($user->avatar)) @php try { $avatarUrl = \App\Helpers\helpers::generateTempURL($user->avatar, config('app.file_system')); } catch (\Exception $e) { $avatarUrl = asset('storage/' . $user->avatar); } @endphp {{ $fullName }} @else
{{ $initials }}
@endif
{{ $fullName }}
Growth
€ 3,030.00
{{ $totalAccounts }}
{{ $activeAccounts }} active
{{ $processingAccounts }} processing
{{ $disabledAccounts }} disabled
€ {{ number_format($totalBalance, 2) }}
{{ $company }}
View →
No customers found.
@endsection @section('page_scripts') @endsection