我具有创建功能
public function logout(){
$url = $this->Auth->logout();
$this->request->session()->destroy();
return $this->redirect($this->Auth->logout());
}
在src / Controller / UsersController中并放入
$this->Auth->allow(['logout']);
berforefilter函数,但注销后重定向到以下URL https://siteurl/webroot/front/?redirect=%2Ffront%2Fdashboard