@foreach($carts as $cart)
@php
$totalprice = $totalprice + $cart->price;
$coursesimage = coursesimage($cart->product_id);
$coursesurl = coursesurl($cart->product_id);
$total_dicount_amount=$total_dicount_amount+ educator_referal_discount_subtotal($cart->product_id);
@endphp
{{--
Discount:Rs.{!!number_format((float)round(educator_referal_discount_subtotal($cart->product_id)), 2, '.', '')!!}
({!!educator_referal_discount_percentage($cart->product_id)!!}% off)
--}}
Subtotal:Rs. {!! $cart->price !!}{{-- {!!number_format((float)round(educator_referal_discount_subtotal($cart->product_id)), 2, '.', '')!!} --}}
Discount:Rs. (-) {!!number_format((float)round(educator_referal_discount_subtotal($cart->product_id)), 2, '.', '')!!}
({!!educator_referal_discount_percentage($cart->product_id)!!}% off)