@extends('layouts.admin') @section('title', 'Orders') @section('content')
All
{{ $totalOrders }}
@foreach($statuses as $status){{ $status }}
{{ $statusCounts[$status] ?? 0 }}
@endforeach| Order # | Customer | Items | Game | Total | Status | Date | ||
|---|---|---|---|---|---|---|---|---|
| {{ $order->order_number }} | {{ $order->user->username ?? 'Guest' }} | {{ $order->email }} |
@php
$itemsList = [];
foreach($order->items as $item) {
$productName = $item->product->name ?? 'Unknown';
$itemsList[] = $productName;
}
$itemsDisplay = implode(', ', $itemsList);
@endphp
@if(count($order->items) > 0)
{{ $itemsDisplay }}
{{ count($order->items) }} item(s)
@else
No items
@endif
|
@php
$firstGame = $order->items->first()?->product?->game;
@endphp
@if($firstGame)
@if($firstGame->icon)
@else
-
@endif
🎮
@endif
{{ $firstGame->name }}
@if($order->items->count() > 1)
+{{ $order->items->count() - 1 }} more
@endif
|
Rp {{ number_format($order->total) }} | {{ ucfirst($order->status) }} | {{ $order->created_at ? $order->created_at->format('d/m/Y H:i') : '-' }} | View |
| @if(request('search')) No orders found matching "{{ request('search') }}" @elseif(request('status')) No orders found with status "{{ request('status') }}" @else No orders found @endif | ||||||||