code: protected function attributeKeys(Model $model)
      {
          if (is_array($this->attributes)) {
              return $this->attributes;
          }
  
          return $model->getVisible();
      }
docs: Get the attributes to serialize for the provided model.
  
  @param Model $model
  @return array