original_string: public function getTableColumns($table, $allColumns = false)
      {
          $tableColumns = Schema::getColumnListing($table);
  
          $tableTypeColumns = [];
          $badColumns = ['id', 'created_at', 'updated_at'];
  
          if ($allColumns) {
              $badColumns = [];
          }
  
          foreach ($tableColumns as $column) {
              if (!in_array($column, $badColumns)) {
                  $type = DB::connection()->getDoctrineColumn($table, $column)->getType()->getName();
                  $tableTypeColumns[$column]['type'] = $type;
              }
          }
  
          return $tableTypeColumns;
      }
code: public function getTableColumns($table, $allColumns = false)
      {
          $tableColumns = Schema::getColumnListing($table);
  
          $tableTypeColumns = [];
          $badColumns = ['id', 'created_at', 'updated_at'];
  
          if ($allColumns) {
              $badColumns = [];
          }
  
          foreach ($tableColumns as $column) {
              if (!in_array($column, $badColumns)) {
                  $type = DB::connection()->getDoctrineColumn($table, $column)->getType()->getName();
                  $tableTypeColumns[$column]['type'] = $type;
              }
          }
  
          return $tableTypeColumns;
      }
code_tokens: public function getTableColumns ( $ table , $ allColumns = false ) { $ tableColumns = Schema :: getColumnListing ( $ table ) ; $ tableTypeColumns = [ ] ; $ badColumns = [ 'id' , 'created_at' , 'updated_at' ] ; if ( $ allColumns ) { $ badColumns = [ ] ; } foreach ( $ tableColumns as $ column ) { if ( ! in_array ( $ column , $ badColumns ) ) { $ type = DB :: connection ( ) -> getDoctrineColumn ( $ table , $ column ) -> getType ( ) -> getName ( ) ; $ tableTypeColumns [ $ column ] [ 'type' ] = $ type ; } } return $ tableTypeColumns ; }
docstring: Get Table Columns.
  
  @param string $table Table name
  
  @return array
docstring_tokens: Get Table Columns .