@if ($orderdata && $orderdata->count() > 0)
@foreach ($orderdata as $item) @php $productData = DB::table('product') ->join('product_color', 'product.id', '=', 'product_color.product_id') ->select( 'product.id', 'product.product_name', 'product.product_image', 'product.product_price', 'product_color.color_image' ) ->where('product.id', $item->product_id) ->where('product.status', 1) ->where('product_color.product_color', $item->color) ->first(); $totalAmount = $item->total + $item->service_fee; @endphp
{{ $item->order_id ?? 'N/A' }}
{{ \Carbon\Carbon::parse($item->created_at)->format('M j, Y') }}
@if($productData && $productData->color_image) {{ $productData->product_name ?? 'Product' }} @else Default Product @endif

{{ $productData->product_name ?? 'Product' }}

Qty: {{ $item->quantity ?? '1' }} Color: {{ $item->color ?? 'Default' }}
Rs. {{ number_format($totalAmount, 2) }}
@endforeach
{{ $orderdata->links() }}
@else

No Orders Found

@if(request()->has('search') && !empty(request()->input('search'))) We couldn't find any orders matching "{{ request()->input('search') }}". @else You haven't placed any orders yet. @endif

@endif