original_string: public function check_database()
      {
  
          $this->line(' * Checking Database');
          $this->table(['Setting', 'Value'], [
              ['Connection', env('DB_CONNECTION')],
              ['Host', env('DB_HOST')],
              ['Database', env('DB_DATABASE')],
              ['Username', env('DB_USERNAME')],
              ['Password', str_repeat('*', strlen(env('DB_PASSWORD')))],
          ]);
  
          try {
  
              $this->info('Connection OK to database: ' .
                  DB::connection()->getDatabaseName());
  
          } catch (Exception $e) {
  
              $this->error('Unable to connect to database server: ' . $e->getMessage());
          }
      }
code: public function check_database()
      {
  
          $this->line(' * Checking Database');
          $this->table(['Setting', 'Value'], [
              ['Connection', env('DB_CONNECTION')],
              ['Host', env('DB_HOST')],
              ['Database', env('DB_DATABASE')],
              ['Username', env('DB_USERNAME')],
              ['Password', str_repeat('*', strlen(env('DB_PASSWORD')))],
          ]);
  
          try {
  
              $this->info('Connection OK to database: ' .
                  DB::connection()->getDatabaseName());
  
          } catch (Exception $e) {
  
              $this->error('Unable to connect to database server: ' . $e->getMessage());
          }
      }
code_tokens: public function check_database ( ) { $ this -> line ( ' * Checking Database' ) ; $ this -> table ( [ 'Setting' , 'Value' ] , [ [ 'Connection' , env ( 'DB_CONNECTION' ) ] , [ 'Host' , env ( 'DB_HOST' ) ] , [ 'Database' , env ( 'DB_DATABASE' ) ] , [ 'Username' , env ( 'DB_USERNAME' ) ] , [ 'Password' , str_repeat ( '*' , strlen ( env ( 'DB_PASSWORD' ) ) ) ] , ] ) ; try { $ this -> info ( 'Connection OK to database: ' . DB :: connection ( ) -> getDatabaseName ( ) ) ; } catch ( Exception $ e ) { $ this -> error ( 'Unable to connect to database server: ' . $ e -> getMessage ( ) ) ; } }
docstring: Check if database access is OK.
docstring_tokens: Check if database access is OK .