public function __construct() { $this->middleware('guest', ['except' => 'login']); }
其中这个except表示login这个方法将不会受到这个中间件的影响 login通常是登出方法