src/FieldManager.php
public function transformToResource(array $array = [])
    {
        if (count($array) < 1) {
            return $array;
        }
        
        $transformation = array_reverse($this->getTransformation());
        $transformed = [];
        
        foreach ($transformation as $name => $new_name) {
            if (! key_exists($name, $array)) {
                
                if (key_exists($new_name, $array)) {
                    $transformed[$name] = $array[$new_name];
                }
                continue;
            }
            
            $transformed[$new_name] = $array[$name];
        }
        
        return $transformed;
    }
public function transformToResource(array $array = [])
    {
        if (count($array) < 1) {
            return $array;
        }
        
        $transformation = array_reverse($this->getTransformation());
        $transformed = [];
        
        foreach ($transformation as $name => $new_name) {
            if (! key_exists($name, $array)) {
                
                if (key_exists($new_name, $array)) {
                    $transformed[$name] = $array[$new_name];
                }
                continue;
            }
            
            $transformed[$new_name] = $array[$name];
        }
        
        return $transformed;
    }
Transform attributes model.

@return array