正在显示
2 个修改的文件
包含
18 行增加
和
0 行删除
@@ -315,4 +315,17 @@ class User extends Frontend | @@ -315,4 +315,17 @@ class User extends Frontend | ||
315 | Db::commit(); | 315 | Db::commit(); |
316 | $this->success('SUCCESS','',['token'=>$token]); | 316 | $this->success('SUCCESS','',['token'=>$token]); |
317 | } | 317 | } |
318 | + | ||
319 | + /** | ||
320 | + * 注销登录 | ||
321 | + */ | ||
322 | + public function logout() | ||
323 | + { | ||
324 | + //注销本站 | ||
325 | + $this->auth->logout(); | ||
326 | + session('token',null); | ||
327 | + Cookie::delete('token'); | ||
328 | + $this->redirect(url('index/index')); | ||
329 | +// $this->success(__('Logout successful'), url('index/index')); | ||
330 | + } | ||
318 | } | 331 | } |
-
请 注册 或 登录 后发表评论