tokens = $tokens; $this->middleware('auth'); } /** * Exchange the current transient API token for a new one. * * @param Request $request * @return Response */ public function refresh(Request $request) { $this->tokens->deleteExpiredTokens($request->user()); return response('Refreshed.')->withCookie( $this->tokens->createTokenCookie($request->user()) ); } }