您好,欢迎访问一九零五行业门户网

Laravel5 开启关闭 CSRF token 方法

所有页面开启和关闭csrf 参考:http://www.cnblogs.com/hd/p/4555369.html
部分页面不需要使用csrf
/*** 指定页面不开启csrf* @var string*/ private $openroutes = ['test/url']; /*** handle an incoming request.* @param \illuminate\http\request $request* @param \closure $next* @return mixed*/public function handle($request, closure $next){ if (in_array($request->path(), $this->openroutes)) { return $next($request); } return parent::handle($request, $next);}
其它类似信息

推荐信息