@extends('admin.layouts.admin') @section('title', 'Orders') @section('admin_content')

Orders

{{-- Success / Error Messages --}} @if(session('success'))
{{ session('success') }}
@endif @if(session('error'))
{{ session('error') }}
@endif
@foreach($orders as $key => $order) @endforeach @if($orders->isEmpty()) @endif
# Order ID User Total Amount Payment Method Status Placed At Actions
{{ $key + 1 }} #{{ $order->id }} {{ $order->user->name ?? 'N/A' }} ₹{{ number_format($order->total_amount, 2) }} {{ ucfirst($order->payment_method) }} {{ ucfirst($order->status) }} {{ $order->created_at->format('d M Y, h:i A') }} View {{-- Optional: Delete Button --}}
@csrf @method('DELETE')
No orders found!
@endsection