@extends('layouts.admin') @section('title', 'Dashboard') @section('content')
Total Users
{{ number_format($stats['total_users']) }}
Total Orders
{{ number_format($stats['total_orders']) }}
Total Products
{{ number_format($stats['total_products']) }}
Revenue
{{ currency($stats['total_revenue']) }}
Pending Orders
{{ number_format($stats['pending_orders']) }}
Processing Orders
{{ number_format($stats['processing_orders'] ?? 0) }}
Delivered Orders
{{ number_format($stats['delivered_orders'] ?? 0) }}
| Order # | Customer | Products | Total | Status | Date | Action |
|---|---|---|---|---|---|---|
| {{ $order->order_number }} |
{{ $order->user ? substr($order->user->username, 0, 1) : 'G' }}
{{ $order->user->username ?? 'Guest' }} {{ $order->user->email ?? $order->email ?? '-' }} |
@php
$orderItems = App\Models\OrderItem::where('order_id', $order->id)->with('product.game')->get();
@endphp
@foreach($orderItems->take(2) as $item)
{{ $item->product->name ?? 'Deleted' }}
×{{ $item->quantity }}
@if($item->product && $item->product->game)
{{ $item->product->game->name }}
@endif
@endforeach
@if($orderItems->count() > 2)
+{{ $orderItems->count() - 2 }} more
@endif
|
{{ currency($order->total) }} @if($order->subtotal != $order->total) {{ currency($order->subtotal) }} @endif | {{ ucfirst($order->status) }} | {{ $order->created_at->format('d M Y, H:i') }} | View |
|
No orders yet Orders will appear here once customers start purchasing |
||||||
{{ $item->product->name ?? 'Deleted' }}
{{ $item->product->game->name ?? 'No Game' }}
{{ number_format($item->total_sold) }} sold
{{ currency($item->product->price ?? 0) }}
No product sales data yet.
@endif