@forelse($carts as $cart)
@php
$pro_price = intval(0);
$pro_price = (intval($cart->productdata->price)*intval($cart->quantity));
$total_cart_price = intval($total_cart_price) + intval($pro_price)
@endphp
-
${{ number_format($cart->productdata->price,2) }}
x{{ $cart->quantity }}
@empty
@endforelse
Total Price:
${{ number_format($total_cart_price,2) }}