@extends('admin.layouts') @section('title', 'Recent Orders') @section('header') @endsection @section('content')

Rejected Orders

@foreach ($recent_orders as $key => $recent_order) @endforeach
S/N ORDER DATE BILL ID USER DETAILS CATEGORY SUBCATEGORY PRODUCT DETAILS AMOUNT ADDRESS
{{ $loop->iteration }} {{ \Carbon\Carbon::parse($recent_order->order_date)->format('d-m-Y') }} {{ $recent_order->order_random_id }}
User ID: {{ $recent_order->user_id ?? 'NA' }}
{{ $recent_order->user_name }}
@php // Decode category and subcategory if stored as JSON or "~" separated values $categories = json_decode($recent_order->category_name, true) ?? explode('~', $recent_order->category_name); $subcategories = json_decode($recent_order->subcategory_name, true) ?? explode('~', $recent_order->subcategory_name); $product_details_name=json_decode($recent_order->product_details_name, true) ?? explode('~', $recent_order->product_details_name); @endphp {{ implode(', ', $categories) }} {{ implode(', ', $subcategories) }} {{ implode(', ', $product_details_name) }} ₹{{ $recent_order->amount }} {{ $recent_order->delivery_address }}
@endsection @section('footer') @endsection