protected function getModelValueAttribute($model, $name)
    {
        $transformedName = $this->transformKey($name);
        if (is_string($model)) {
            return $model;
        } elseif (is_object($model)) {
            return object_get($model, $transformedName);
        } elseif (is_array($model)) {
            return array_get($model, $transformedName);
        }
    }
protected function getModelValueAttribute($model, $name)
    {
        $transformedName = $this->transformKey($name);
        if (is_string($model)) {
            return $model;
        } elseif (is_object($model)) {
            return object_get($model, $transformedName);
        } elseif (is_array($model)) {
            return array_get($model, $transformedName);
        }
    }
protected function getModelValueAttribute ( $ model , $ name ) { $ transformedName = $ this -> transformKey ( $ name ) ; if ( is_string ( $ model ) ) { return $ model ; } elseif ( is_object ( $ model ) ) { return object_get ( $ model , $ transformedName ) ; } elseif ( is_array ( $ model ) ) { return array_get ( $ model , $ transformedName ) ; } }
Get the attribute value from the model by name

@param mixed $model
@param string $name
@return mixed
Get the attribute value from the model by name