jeffharrell/minicart

send laravel token

Opened this issue · 2 comments

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

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

I'm looking for the same answer

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,