@php use App\Services\CartService; $cartService = app(CartService::class); $items = $cartService->getItems(); $total = $cartService->getTotal(); $count = $cartService->getCount(); @endphp

Your cart {{ $count }}

@if(count($items) > 0)
    @foreach($items as $item)
  • {{ $item['product']->name }}
    Qty: {{ $item['quantity'] }}
    ${{ number_format($item['subtotal'], 2) }}
  • @endforeach
  • Total (USD) ${{ number_format($total, 2) }}
View Cart @auth Checkout @else Login to Checkout @endauth @else

Your cart is empty

Continue Shopping @endif