1. 程式人生 > >laravel jwt 退出登入

laravel jwt 退出登入

     public function exit_logon(Request $request) 
    {


        // JWTAuth::invalidate(JWTAuth::getToken());
         // $cookie= UserService.logout().$promise.then(function() {
         //        $cookieStore.remove('CG_TK');
               
         //    });


       JWTAuth::invalidate(JWTAuth::getToken('CG_TK'));
        $data['status']="1";
        return $this->responseSuccess($data,'request_success');


    }