123456789101112131415161718192021222324 |
- <?php
- /**
- * Created by PhpStorm
- * User:林志杰
- * Email:[email protected]
- * Motto:纵有疾风起,人生不言弃!
- * Time:2020/2/9 1:10
- */
- namespace app\api\controller;
- class Logout extends AuthBase
- {
- public function index()
- {
- // 删除 redis token 缓存
- $res = cache(config('redis.token_pre') . $this->accessToken, null);
- if ($res) {
- return show(config('status.success'), '退出登陆成功');
- }
- return show(config('status.error'), '退出登陆失败');
- }
- }
|