original_string: public function regenerateApiKey(User $user)
      {
          $user->api_key = User::generateApiKey();
          $user->save();
  
          event(new UserRegeneratedApiTokenEvent($user));
  
          return cachet_redirect('dashboard.user');
      }
code: public function regenerateApiKey(User $user)
      {
          $user->api_key = User::generateApiKey();
          $user->save();
  
          event(new UserRegeneratedApiTokenEvent($user));
  
          return cachet_redirect('dashboard.user');
      }
code_tokens: public function regenerateApiKey ( User $ user ) { $ user -> api_key = User :: generateApiKey ( ) ; $ user -> save ( ) ; event ( new UserRegeneratedApiTokenEvent ( $ user ) ) ; return cachet_redirect ( 'dashboard.user' ) ; }
docstring: Regenerates the users API key.
  
  @param \CachetHQ\Cachet\Models\User $user
  
  @return \Illuminate\View\View
docstring_tokens: Regenerates the users API key .