@extends('layouts.user') @section('title', 'Dashboard') @section('content')

Dashboard

Welcome back, {{ $user->username ?? 'User' }}! 👋

{{ currency_code() }} ({{ currency_symbol() }})

Total Orders

{{ $stats['total_orders'] ?? 0 }}

Total Spent

{{ currency($stats['total_spent'] ?? 0) }}

Pending Orders

{{ $stats['pending_orders'] ?? 0 }}

Cashback

{{ currency($stats['cashback'] ?? 0) }}

Shop Now My Orders New Ticket Profile

Recent Orders

View All
@forelse($orders as $order) @php $orderItems = App\Models\OrderItem::where('order_id', $order->id) ->with(['product.game']) ->get(); $firstItem = $orderItems->first(); @endphp @empty @endforelse
Order # Date Game Product Qty Total Status Action
{{ $order->order_number }} {{ $order->created_at->format('d M Y') }} @if($firstItem && $firstItem->product && $firstItem->product->game)
@if($firstItem->product->game->icon) {{ $firstItem->product->game->name }} @endif {{ $firstItem->product->game->name }}
@else - @endif
@foreach($orderItems->take(2) as $item)
@if($item->product && $item->product->image) {{ $item->product->name }} @else
@endif
{{ $item->product->name ?? 'Deleted Product' }} ×{{ $item->quantity }}
@endforeach @if($orderItems->count() > 2) +{{ $orderItems->count() - 2 }} more items @endif
{{ $orderItems->sum('quantity') }} {{ currency($order->total) }} {{ ucfirst($order->status) }} View

No orders yet

Start shopping to see your orders here

Shop Now

Order Status Summary

Total Orders {{ $stats['total_orders'] ?? 0 }}
Pending {{ $stats['pending_orders'] ?? 0 }}
Processing {{ $stats['processing_orders'] ?? 0 }}
Delivered {{ $stats['completed_orders'] ?? 0 }}
Total Spent {{ currency($stats['total_spent'] ?? 0) }}

Account Info

Username {{ $user->username ?? '-' }}
Email {{ $user->email ?? '-' }}
Roblox Username {{ $user->roblox_username ?? 'Not set' }}
Member Since {{ $user->created_at ? $user->created_at->format('d M Y') : '-' }}
Currency {{ currency_code() }} ({{ currency_symbol() }})
@endsection