@php use Illuminate\Support\Facades\Auth; use Illuminate\Support\Str; $customer = Auth::guard('customer')->user(); $customerId = $customer->id; // Site Name & Logo $siteName = \App\Models\GeneralSetting::first(); $siteInitial = strtoupper(substr($siteName->name ?? 'G', 0, 1)); $siteDisplayName = Str::limit($siteName->name ?? 'GadgetShop', 8); $generalsetting = $siteName; $darkLogo = $siteName->dark_logo ?? null; // Pending Orders Count for Badge $pendingOrdersCount = \App\Models\Order::where('customer_id', $customerId) ->whereNotIn('order_status', ['6', '11']) ->count(); // Profile Image - Use direct image path, not accessor $profileImage = $profile_edit->image ? asset($profile_edit->image) : asset('public/uploads/default/no-image.png'); // Total Order Amount $totalOrderAmount = \App\Models\Order::where('customer_id', $customerId)->sum('amount'); @endphp