Level 75
I would suggest doing calculations in either:
- controller
- or helper class
- or accessor
But have you done a dd, or echo, or used network tab to check the request / response.
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
when i am passing the session data in to input value i am getting error invalid
@if (Session::has('coupon'))
<input value="{{(Session::get('coupon')['balance'])*(1+$setting->vat/100)+$setting->shipping_charge}}" name="tAmt" type="hidden">
<input value="{{(Session::get('coupon')['balance'])*(1+$setting->vat/100)+$setting->shipping_charge}}" name="amt" type="hidden">
@else
<input value="{{Cart::subtotal()*(1+$setting->vat/100)+$setting->shipping_charge}}" name="tAmt" type="hidden">
<input value="{{Cart::subtotal()*(1+$setting->vat/100)+$setting->shipping_charge}}" name="amt" type="hidden">
@endif
Please or to participate in this conversation.