Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

419 unknown status ajax laravel



Use this in the head section:

<meta name="csrf-token" content="{{ csrf_token() }}">
and get the csrf token in ajax:

$.ajaxSetup({
  headers: {
    'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
  }
});
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #unknown #status #ajax #laravel
ADD COMMENT
Topic
Name
4+8 =