@extends('admin::layouts.master') @section('title', 'Orders') @section('content')

Orders

@php $total = array_sum($statusCounts) ?: 0; @endphp
@foreach(['pending' => 'yellow', 'confirmed' => 'blue', 'processing' => 'indigo', 'shipped' => 'purple', 'delivered' => 'green', 'cancelled' => 'red'] as $st => $color)

{{ $statusCounts[$st] ?? 0 }}

{{ $st }}

@endforeach

{{ $total }}

Total

Clear
@forelse($orders as $order) @empty @endforelse
Order Session Status Payment Items Total Date Actions
{{ $order->order_number }} {{ \Illuminate\Support\Str::limit($order->session_id, 16) }} @php $statusColors = ['pending' => 'yellow', 'confirmed' => 'blue', 'processing' => 'indigo', 'shipped' => 'purple', 'delivered' => 'green', 'cancelled' => 'red']; $c = $statusColors[$order->status] ?? 'gray'; @endphp {{ ucfirst($order->status) }} {{ ucfirst($order->payment_status) }} {{ $order->orderItems->count() }} €{{ number_format($order->total, 2) }} {{ $order->created_at->format('d M Y') }} View Edit
@csrf @method('DELETE')
No orders found matching your criteria.
{{ $orders->withQueryString()->links() }}
@endsection