class LoginCheck
{
protected $arr=['addShow','showData'];
/**
* 处理请求
*
* @param \think\Request $request
* @param \Closure $next
* @return Response
*/
public function handle($request, \Closure $next)
{
$response=$next($request);
if(!in_array($request->pathinfo(),$this->arr)){
return redirect('loginShow');
}
return $response;
}
}