src/Traits/FieldsRules.php
public function transform(array $array)
    {
        $transformation = $this->getTransformation();
        $transformed = [];
        
        if (key_exists('public_id', $array)) {
            $transformed['id'] = $array['public_id'];
        }
        
        foreach ($transformation as $name => $new_name) {
            if (! key_exists($name, $array)) {
                continue;
            }
            
            $transformed[$new_name] = $array[$name];
        }
        
        /*$transformed = array(
            'uri' => $this->getResourceData()
        ) + $transformed;*/
        
        return $transformed;
    }
public function transform(array $array)
    {
        $transformation = $this->getTransformation();
        $transformed = [];
        
        if (key_exists('public_id', $array)) {
            $transformed['id'] = $array['public_id'];
        }
        
        foreach ($transformation as $name => $new_name) {
            if (! key_exists($name, $array)) {
                continue;
            }
            
            $transformed[$new_name] = $array[$name];
        }
        
        /*$transformed = array(
            'uri' => $this->getResourceData()
        ) + $transformed;*/
        
        return $transformed;
    }
public function transform ( array $ array ) { $ transformation = $ this -> getTransformation ( ) ; $ transformed = [ ] ; if ( key_exists ( 'public_id' , $ array ) ) { $ transformed [ 'id' ] = $ array [ 'public_id' ] ; } foreach ( $ transformation as $ name => $ new_name ) { if ( ! key_exists ( $ name , $ array ) ) { continue ; } $ transformed [ $ new_name ] = $ array [ $ name ] ; } /*$transformed = array(
            'uri' => $this->getResourceData()
        ) + $transformed;*/ return $ transformed ; }
Transform attributes model.

@return array
Transform attributes model .