Laravel5.5 构造函数查看是否登录(session)

验证是否登录


public function __construct()

{

$this->request = request();

// 验证是否登录

$this->middleware(function ($request, $next) {

     if (sessino('user')) {

                echo "";

        }

        return $next($request);

        });

}

你可能感兴趣的:(Laravel5.5 构造函数查看是否登录(session))