@extends('admin.layouts.home') @section('title', 'Orders Management') @section('styles') @endsection @section('content')

Orders Management

Dashboard
Filter Orders
Reset
Orders List {{ $orders->total() }} Orders
@if($orders->isEmpty())
No orders found. Try adjusting your filters.
@else
@foreach($orders as $order) @endforeach
Order # Customer Products Total Status Date Actions
#{{ $order->order_number }} @if($order->user)
@if($order->user->avatar) {{ $order->user->name }} @else
@endif
{{ $order->user->name }}
@else Guest @endif
@foreach($order->products->take(3) as $product)
@if($product->thumbnail) {{ $product->name }} @else
@endif
@endforeach @if($order->products->count() > 3)
+{{ $order->products->count() - 3 }}
@endif
${{ number_format($order->total_amount, 2) }} @php $statusClass = [ 'pending' => 'bg-warning text-dark', 'processing' => 'bg-info text-white', 'shipped' => 'bg-primary', 'delivered' => 'bg-success', 'completed' => 'bg-success', 'cancelled' => 'bg-danger', ][$order->status] ?? 'bg-secondary'; @endphp {{ ucfirst($order->status) }} {{ $order->created_at->format('M d, Y H:i') }}
{{ $orders->appends(request()->query())->links('pagination::bootstrap-5') }}
@endif
@endsection @section('scripts') @endsection