这是连续几次登录和退出时发生的事情的屏幕截图.如何在用户注销时删除生命周期cookie?到目前为止我已经尝试过
Auth::logout(); Session::flush();
这是连续几次登录和退出时发生的事情的屏幕截图.如何在用户注销时删除生命周期cookie?到目前为止我已经尝试过
Auth::logout(); Session::flush();
public function getlogout() { // your code here ..... // Get remember_me cookie name $rememberMeCookie = Auth::getRecallerName(); // Tell Laravel to forget this cookie $cookie = Cookie::forget($rememberMeCookie); return Redirect::to('/')->withCookie($cookie); }
只记得用重定向重新启动cookie,否则它将无效.