猿问

Laravel注销功能不起作用?

在laravel 5.7中,当我单击注销按钮时,注销功能不起作用,它向我显示此错误/var/www/html/orderManager/vendor/auth0/login/src/Auth0/Login/Auth0Service.php


$this->authApi = new Authentication($this->auth0Config['domain'], 

$this->auth0Config['client_id']);

“未定义的索引:域”

web.php


Route::get('logout', 'HomeController@logout');

HomeController.php


public function logout() {

        Auth::logout();

        Session::flush();

        return redirect('/login');

    }


千巷猫影
浏览 121回答 2
2回答

萧十郎

我删除这个"auth0/login": "~5.0"从composer.jsonupdate composer及其工作..

Cats萌萌

如果您自己进行自定义注销,则可以将注销方法更改为如下所示public function logout() {     auth()->logout();     return redirect('/login');}然后删除auth0软件包并尝试运行composer更新
随时随地看视频慕课网APP
我要回答