original_string: protected function configureDrivers(array $default = [])
      {
          $config = array_merge([
              'CACHE_DRIVER'   => null,
              'SESSION_DRIVER' => null,
              'QUEUE_DRIVER'   => null,
          ], $default);
  
          // Format the settings ready to display them in the table.
          $this->formatConfigsTable($config);
  
          $config['CACHE_DRIVER'] = $this->choice('Which cache driver do you want to use?', [
              'apc'       => 'APC(u)',
              'array'     => 'Array',
              'database'  => 'Database',
              'file'      => 'File',
              'memcached' => 'Memcached',
              'redis'     => 'Redis',
          ], $config['CACHE_DRIVER']);
  
          // We need to configure Redis.
          if ($config['CACHE_DRIVER'] === 'redis') {
              $this->configureRedis();
          }
  
          $config['SESSION_DRIVER'] = $this->choice('Which session driver do you want to use?', [
              'apc'       => 'APC(u)',
              'array'     => 'Array',
              'database'  => 'Database',
              'file'      => 'File',
              'memcached' => 'Memcached',
              'redis'     => 'Redis',
          ], $config['SESSION_DRIVER']);
  
          // We need to configure Redis.
          if ($config['SESSION_DRIVER'] === 'redis') {
              $this->configureRedis();
          }
  
          $config['QUEUE_DRIVER'] = $this->choice('Which queue driver do you want to use?', [
              'null'       => 'None',
              'sync'       => 'Synchronous',
              'database'   => 'Database',
              'beanstalkd' => 'Beanstalk',
              'sqs'        => 'Amazon SQS',
              'redis'      => 'Redis',
          ], $config['QUEUE_DRIVER']);
  
          // We need to configure Redis, but only if the cache driver wasn't redis.
          if ($config['QUEUE_DRIVER'] === 'redis' && ($config['SESSION_DRIVER'] !== 'redis' || $config['CACHE_DRIVER'] !== 'redis')) {
              $this->configureRedis();
          }
  
          // Format the settings ready to display them in the table.
          $this->formatConfigsTable($config);
  
          if (!$this->confirm('Are these settings correct?')) {
              return $this->configureDrivers($config);
          }
  
          foreach ($config as $setting => $value) {
              $this->writeEnv($setting, $value);
          }
      }
code: protected function configureDrivers(array $default = [])
      {
          $config = array_merge([
              'CACHE_DRIVER'   => null,
              'SESSION_DRIVER' => null,
              'QUEUE_DRIVER'   => null,
          ], $default);
  
          // Format the settings ready to display them in the table.
          $this->formatConfigsTable($config);
  
          $config['CACHE_DRIVER'] = $this->choice('Which cache driver do you want to use?', [
              'apc'       => 'APC(u)',
              'array'     => 'Array',
              'database'  => 'Database',
              'file'      => 'File',
              'memcached' => 'Memcached',
              'redis'     => 'Redis',
          ], $config['CACHE_DRIVER']);
  
          // We need to configure Redis.
          if ($config['CACHE_DRIVER'] === 'redis') {
              $this->configureRedis();
          }
  
          $config['SESSION_DRIVER'] = $this->choice('Which session driver do you want to use?', [
              'apc'       => 'APC(u)',
              'array'     => 'Array',
              'database'  => 'Database',
              'file'      => 'File',
              'memcached' => 'Memcached',
              'redis'     => 'Redis',
          ], $config['SESSION_DRIVER']);
  
          // We need to configure Redis.
          if ($config['SESSION_DRIVER'] === 'redis') {
              $this->configureRedis();
          }
  
          $config['QUEUE_DRIVER'] = $this->choice('Which queue driver do you want to use?', [
              'null'       => 'None',
              'sync'       => 'Synchronous',
              'database'   => 'Database',
              'beanstalkd' => 'Beanstalk',
              'sqs'        => 'Amazon SQS',
              'redis'      => 'Redis',
          ], $config['QUEUE_DRIVER']);
  
          // We need to configure Redis, but only if the cache driver wasn't redis.
          if ($config['QUEUE_DRIVER'] === 'redis' && ($config['SESSION_DRIVER'] !== 'redis' || $config['CACHE_DRIVER'] !== 'redis')) {
              $this->configureRedis();
          }
  
          // Format the settings ready to display them in the table.
          $this->formatConfigsTable($config);
  
          if (!$this->confirm('Are these settings correct?')) {
              return $this->configureDrivers($config);
          }
  
          foreach ($config as $setting => $value) {
              $this->writeEnv($setting, $value);
          }
      }
code_tokens: protected function configureDrivers ( array $ default = [ ] ) { $ config = array_merge ( [ 'CACHE_DRIVER' => null , 'SESSION_DRIVER' => null , 'QUEUE_DRIVER' => null , ] , $ default ) ; // Format the settings ready to display them in the table. $ this -> formatConfigsTable ( $ config ) ; $ config [ 'CACHE_DRIVER' ] = $ this -> choice ( 'Which cache driver do you want to use?' , [ 'apc' => 'APC(u)' , 'array' => 'Array' , 'database' => 'Database' , 'file' => 'File' , 'memcached' => 'Memcached' , 'redis' => 'Redis' , ] , $ config [ 'CACHE_DRIVER' ] ) ; // We need to configure Redis. if ( $ config [ 'CACHE_DRIVER' ] === 'redis' ) { $ this -> configureRedis ( ) ; } $ config [ 'SESSION_DRIVER' ] = $ this -> choice ( 'Which session driver do you want to use?' , [ 'apc' => 'APC(u)' , 'array' => 'Array' , 'database' => 'Database' , 'file' => 'File' , 'memcached' => 'Memcached' , 'redis' => 'Redis' , ] , $ config [ 'SESSION_DRIVER' ] ) ; // We need to configure Redis. if ( $ config [ 'SESSION_DRIVER' ] === 'redis' ) { $ this -> configureRedis ( ) ; } $ config [ 'QUEUE_DRIVER' ] = $ this -> choice ( 'Which queue driver do you want to use?' , [ 'null' => 'None' , 'sync' => 'Synchronous' , 'database' => 'Database' , 'beanstalkd' => 'Beanstalk' , 'sqs' => 'Amazon SQS' , 'redis' => 'Redis' , ] , $ config [ 'QUEUE_DRIVER' ] ) ; // We need to configure Redis, but only if the cache driver wasn't redis. if ( $ config [ 'QUEUE_DRIVER' ] === 'redis' && ( $ config [ 'SESSION_DRIVER' ] !== 'redis' || $ config [ 'CACHE_DRIVER' ] !== 'redis' ) ) { $ this -> configureRedis ( ) ; } // Format the settings ready to display them in the table. $ this -> formatConfigsTable ( $ config ) ; if ( ! $ this -> confirm ( 'Are these settings correct?' ) ) { return $ this -> configureDrivers ( $ config ) ; } foreach ( $ config as $ setting => $ value ) { $ this -> writeEnv ( $ setting , $ value ) ; } }
docstring: Configure other drivers.
  
  @param array $default
  
  @return void
docstring_tokens: Configure other drivers .