public function onlyFillable(array $input)
    {
        $result = array_intersect_key($input, array_flip($this->modelInstance->getFillable()));

        foreach ($this->avoidEmptyUpdate as $avoid) {
            if (array_key_exists($avoid, $result) && empty($result[$avoid])) {
                unset($result[$avoid]);
            }
        }

        return $result;
    }
public function onlyFillable(array $input)
    {
        $result = array_intersect_key($input, array_flip($this->modelInstance->getFillable()));

        foreach ($this->avoidEmptyUpdate as $avoid) {
            if (array_key_exists($avoid, $result) && empty($result[$avoid])) {
                unset($result[$avoid]);
            }
        }

        return $result;
    }
public function onlyFillable ( array $ input ) { $ result = array_intersect_key ( $ input , array_flip ( $ this -> modelInstance -> getFillable ( ) ) ) ; foreach ( $ this -> avoidEmptyUpdate as $ avoid ) { if ( array_key_exists ( $ avoid , $ result ) && empty ( $ result [ $ avoid ] ) ) { unset ( $ result [ $ avoid ] ) ; } } return $ result ; }
Filter input from un allowed fields for model

@param array $input
@return array
Filter input from un allowed fields for model