@extends('page_layout') @section('section')

Your Cart

@if(session('success'))
{{ session('success') }}
@endif @if(count($cartItems) > 0) @php $grandTotal = 0; @endphp @foreach($cartItems as $item) @php $total = $item['price'] * $item['quantity']; $grandTotal += $total; @endphp @endforeach
Item Name Qty Price Total Action
{{ $item['name'] }} {{ $item['quantity'] }} ${{ number_format($item['price'], 2) }} ${{ number_format($total, 2) }}
@csrf
Grand Total ${{ number_format($grandTotal, 2) }}
{{-- Future Gateway --}} @else

Your cart is empty.

@endif
@if($cartItems->count()) @foreach($cartItems as $item) @endforeach
Image Product Qty Price Subtotal
{{ $item->product->title }} {{ $item->quantity }} ₹{{ $item->product->price }} ₹{{ $item->product->price * $item->quantity }}
@else

Your cart is empty.

@endif {{-- Future Gateway --}}
@endsection