Answers for "ajax error 419 in laravel"

PHP
1

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')
  }
});
Posted by: Guest on January-13-2022
4

413 error laravel

// Need to increase or set client_max_body_size in your nginx config file. 
http {
    #...
        client_max_body_size 100m;
    #...
}
// Restart nginx
Posted by: Guest on December-16-2020

Browse Popular Code Answers by Language