original_string: public function createTokenDriver($name, $config)
      {
          // The token guard implements a basic API token based guard implementation
          // that takes an API token field from the request and matches it to the
          // user in the database or another persistence layer where users are.
          $guard = new TokenGuard(
              $this->createUserProvider($config['provider'] ?? null),
              $this->app['request'],
              $config['input_key'] ?? 'api_token',
              $config['storage_key'] ?? 'api_token',
              $config['hash'] ?? false
          );
  
          $this->app->refresh('request', $guard, 'setRequest');
  
          return $guard;
      }
code: public function createTokenDriver($name, $config)
      {
          // The token guard implements a basic API token based guard implementation
          // that takes an API token field from the request and matches it to the
          // user in the database or another persistence layer where users are.
          $guard = new TokenGuard(
              $this->createUserProvider($config['provider'] ?? null),
              $this->app['request'],
              $config['input_key'] ?? 'api_token',
              $config['storage_key'] ?? 'api_token',
              $config['hash'] ?? false
          );
  
          $this->app->refresh('request', $guard, 'setRequest');
  
          return $guard;
      }
code_tokens: public function createTokenDriver ( $ name , $ config ) { // The token guard implements a basic API token based guard implementation // that takes an API token field from the request and matches it to the // user in the database or another persistence layer where users are. $ guard = new TokenGuard ( $ this -> createUserProvider ( $ config [ 'provider' ] ?? null ) , $ this -> app [ 'request' ] , $ config [ 'input_key' ] ?? 'api_token' , $ config [ 'storage_key' ] ?? 'api_token' , $ config [ 'hash' ] ?? false ) ; $ this -> app -> refresh ( 'request' , $ guard , 'setRequest' ) ; return $ guard ; }
docstring: Create a token based authentication guard.
  
  @param  string  $name
  @param  array  $config
  @return \Illuminate\Auth\TokenGuard
docstring_tokens: Create a token based authentication guard .