Answers for "419 Unknown status, csrf token required, ajax csrf setup"

0

419 Unknown status, csrf token required, ajax csrf setup

in HTML <head></head> 
add <meta name="csrf-token" content="{{ csrf_token() }}" />
then 
<script type="text/javascript">
$.ajaxSetup({
    headers: {
        'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
    }
});
</script>
Posted by: Guest on September-02-2021
0

419 Unknown status, csrf token required, ajax csrf setup

<script type="text/javascript">
$.ajaxSetup({
    headers: {
        'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
    }
});
</script>
Posted by: Guest on September-02-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language