Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

csrf token mismatch laravel

Laravel ajax solution: 
  1. "_token": "{{ csrf_token() }}",
  2.  headers: {'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')},
  3.$.ajaxSetup({
    headers: {
        'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
    }
});
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #csrf #token #mismatch #laravel
ADD COMMENT
Topic
Name
6+6 =