@php
$totalPrice = 0;
@endphp
@if(is_array($decodedCarts) && count($decodedCarts) > 0)
@foreach($decodedCarts as $cart)
@php
$qty = 0;
if(!isset($cart->qty)){
$qty = 1;
}
else{
$qty = $cart->qty;
}
$totalPrice += $cart->price * $qty;
// $totalPrice += $cart->price;
@endphp
@endforeach
@endif
Total Summary
Subtotal:
P{{ $totalPrice }}
Total:
P{{ $totalPrice }}