code: public function hasAttribute($name)
      {
          return isset($this->_attributes[$name]) || in_array($name, $this->attributes(), true);
      }
docs: Returns a value indicating whether the model has an attribute with the specified name.
  @param string $name the name of the attribute
  @return bool whether the model has an attribute with the specified name.