Eloquence\Behaviours\CamelCasing::getAttribute PHP Method

getAttribute() public method

Retrieve a given attribute but allow it to be accessed via alternative case methods (such as camelCase).
public getAttribute ( string $key ) : mixed
$key string
return mixed
    public function getAttribute($key)
    {
        if (method_exists($this, $key)) {
            return $this->getRelationValue($key);
        }
        return parent::getAttribute($this->getSnakeKey($key));
    }