RewriteCond %{HTTP:Authorization} ^(.+)$ RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
public function handle($request, \Closure $next) { $token=Jwt::getRequestToken(); $data=Jwt::verifyjwt($token)->getData(); if($data['code']==200){ return $next($request); } return fail('请先登录'); } }