getAttribute() public method

Returns an attribute value.
public getAttribute ( string $name ) : mixed
$name string The attribute name
return mixed The attribute value
 /**
  * Returns an attribute as an array of values
  * @param string $name
  * @return array
  */
 public function getArrayAttribute($name)
 {
     $value = parent::getAttribute($name);
     return is_array($value) ? $value : array($value);
 }