📜  419 未知状态 ajax laravel - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:02:29.955000             🧑  作者: Mango

代码示例1
Use this in the head section:


and get the csrf token in ajax:

$.ajaxSetup({
  headers: {
    'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
  }
});