minicart icon indicating copy to clipboard operation
minicart copied to clipboard

send laravel token

Open mRamadan0101 opened this issue 5 years ago • 2 comments

how to use mini cart to form to send laravel token csrf_token

<input type="hidden" name="_token" value="{{ csrf_token() }}" />

mRamadan0101 avatar Mar 14 '19 13:03 mRamadan0101

I'm looking for the same answer

FIRDOUS-BHAT avatar Jan 25 '20 05:01 FIRDOUS-BHAT

I solved it! In minicart.js, I fetched the token value like this,

const token = $('input[name=_token]').val()

and gave this in template attribute within the form,

FIRDOUS-BHAT avatar Jan 25 '20 06:01 FIRDOUS-BHAT