修改登录
This commit is contained in:
parent
6ac4b8784e
commit
2d6d074d94
@ -48,15 +48,16 @@ class Index extends CatchController
|
||||
* 登出
|
||||
*
|
||||
* @time 2019年11月28日
|
||||
* @return bool
|
||||
* @return \think\response\Json
|
||||
* @throws \Exception
|
||||
*/
|
||||
public function logout(): bool
|
||||
public function logout(): \think\response\Json
|
||||
{
|
||||
if (Auth::logout()) {
|
||||
return redirect(url('login'));
|
||||
return CatchResponse::success();
|
||||
}
|
||||
|
||||
return false;
|
||||
return CatchResponse::fail('登出失败');
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user