public function getAttribute($key)
    {
        if (isset($this->mutations[$key]))
        {
            return $this->mutations[$key];
        }

        if (array_key_exists($key, $mutatables = static::getMutatables()))
        {
            return $this->mutateExtensionAttribute($key, $mutatables[$key]);
        }

        return parent::getAttribute($key);
    }
public function getAttribute($key)
    {
        if (isset($this->mutations[$key]))
        {
            return $this->mutations[$key];
        }

        if (array_key_exists($key, $mutatables = static::getMutatables()))
        {
            return $this->mutateExtensionAttribute($key, $mutatables[$key]);
        }

        return parent::getAttribute($key);
    }
public function getAttribute ( $ key ) { if ( isset ( $ this -> mutations [ $ key ] ) ) { return $ this -> mutations [ $ key ] ; } if ( array_key_exists ( $ key , $ mutatables = static :: getMutatables ( ) ) ) { return $ this -> mutateExtensionAttribute ( $ key , $ mutatables [ $ key ] ) ; } return parent :: getAttribute ( $ key ) ; }
Get an attribute from the model with custom accessor.

@param  string $key
@return mixed
Get an attribute from the model with custom accessor .