@php
$cartItems = session('cart', []);
$productIds = collect($cartItems)->pluck('product_id')->toArray();
$products = \App\Models\Product::whereIn('id', $productIds)->get()->keyBy('id');
@endphp
@if (!empty($cartItems))
@foreach ($cartItems as $id => $product)
@php
$productData = $products[$product['product_id']] ?? null;
@endphp
@if ($productData)
USD {{ number_format($product['price']) }}
@endif
@endforeach
@endif
@if (empty($cartItems))
@else
@endif