<?php
declare (strict_types = 1);

namespace app\middleware;
use Closure;
use think\facade\Session;
class checkLogin
{
    /**
     * 验证登录中间件，现在使用在操作端
     */
    public function handle($request, Closure $next)
    {
        $user_info = Session::get('user_info');
        if(empty($user_info)){
            return redirect('/login/index');
        }
		return $next($request);
    }
}