Summer Sale! All accounts are 50% off this week.

anilkumarthakur60's avatar

passing session data in input value

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

0 likes
1 reply
jlrdw's avatar

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.

Please or to participate in this conversation.