The page has expired due to inactivity. Please refresh and try again.
laravel5.6 开发API使用apipost调用路由时报The page has expired due to inactivity. Please refresh and try again.错误
这是由于在Laravel框架中有此要求:
任何指向 web 中 POST, PUT 或 DELETE 路由的 HTML 表单请求都应该包含一个 CSRF 令牌(CSRF token),否则,这个请求将会被拒绝。
解决办法:
找到
/app/Http/Middleware/VerifyCsrfToken.php
把路由加上去
如果觉得《The page has expired due to inactivity. Please refresh and try again.》对你有帮助,请点赞、收藏,并留下你的观点哦!