@extends('front-end.layout.app') @section('content') {{-- --}} @if ($errors->any())
@endif

Shopping cart {{-- (1)--}}

  • Red dead redemption 2
    Price:
    $399.99
    Stock:
    In Stock
    Quantity:
    1
    {{--
    Subtotal:
    $399.99
    --}}
    Subtotal:
    ${{ number_format($cartTotal, 2) }}
@if (Session::has('error_message')) @endif @if (Session::has('success_message')) @endif @php $total = 0; @endphp @forelse ($cart as $item) @php $subtotal = 12 * $item['quantity']; $total += $subtotal; @endphp {{-- @foreach ($cart as $item) --}} --}} {{-- --}} {{-- {{-- ${{ number_format($item['regular_price'] ?? $item['price'], 2) }} --}} {{-- --}} {{-- ${{ number_format($item['regular_price'] ?? $item['price'], 2) }} --}} @empty @endforelse
Image Product name Unit price Quantity Subtotal
@csrf @method('DELETE')
{{--
{{ $item['name'] }} {{ $item['name'] }} {{ $item['name'] }} $399.99 --}} @php $price = $item['regular_price'] ?? ($item['price'] ?? null); @endphp {{ $price !== null ? '$' . number_format($price, 2) : 'N/A' }} 1 @php $price = $item['regular_price'] ?? $item['price'] ?? 0; @endphp {{ number_format($price * $item['quantity'], 2) }}
Your cart is empty.
Cart totals
Subtotal
${{ number_format($cartTotal, 2) }}
Shipping
Total
${{ number_format($cartTotal, 2) }}

You may be interested in…

@endsection