Shopping Cart

@php $cart = session('cart', []); @endphp @if(count($cart) > 0)
@foreach($cart as $id => $item)
{{ $item['name'] }}

{{ $item['name'] }}

@if(!empty($item['color']) || !empty($item['size']))

@if(!empty($item['color'])){{ $item['color'] }}@endif @if(!empty($item['color']) && !empty($item['size'])) / @endif @if(!empty($item['size'])){{ $item['size'] }}@endif

@endif
@csrf @method('PATCH')
{{ $item['quantity'] }}
@csrf @method('PATCH')
৳{{ number_format($item['price'] * $item['quantity'], 2) }}
@csrf @method('DELETE')
@endforeach
@else

Your cart is empty

Continue Shopping
@endif
@if(count($cart) > 0)
@php $subtotal = collect($cart)->sum(fn($item) => $item['price'] * $item['quantity']); @endphp
Subtotal: ৳{{ number_format($subtotal, 2) }}

Shipping calculated at checkout

@endif