code: protected function getModelAttributes(Model $model)
      {
          $attributes = [];
  
          foreach ($this->attributeKeys($model) as $modelKey => $field) {
              if (is_numeric($modelKey)) {
                  $modelKey = $field;
                  $field = $this->fieldForAttribute($field);
              }
  
              $attributes[$field] = $this->extractAttribute($model, $modelKey, $field);
          }
  
          return $attributes;
      }
docs: Get attributes for the provided model.
  
  @param Model $model
  @return array