在头部使用此命令:
<meta name="csrf-token" content="{{ csrf_token() }}">并在ajax中获取csrf令牌:
$.ajaxSetup({ headers: { 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') }});请参考Laravel文档csrf_token

在头部使用此命令:
<meta name="csrf-token" content="{{ csrf_token() }}">并在ajax中获取csrf令牌:
$.ajaxSetup({ headers: { 'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content') }});请参考Laravel文档csrf_token
上一篇 如何在Django中重置数据库?我收到命令“重置”未找到错误
下一篇 为什么使用Object.prototype.hasOwnProperty.call(myObj,prop)代替myObj.hasOwnProperty(prop)?