src/Mutator/Mutator.php
public function mutate($value, $callables)
    {
        if (!is_array($callables)) {
            $callables = explode('|', $callables);
        }

        foreach ($callables as $callable) {
            list($callable, $args) = $this->parse(trim($callable));

            $value = call_user_func_array($callable, array_merge([$value], $args));
        }

        return $value;
    }
public function mutate($value, $callables)
    {
        if (!is_array($callables)) {
            $callables = explode('|', $callables);
        }

        foreach ($callables as $callable) {
            list($callable, $args) = $this->parse(trim($callable));

            $value = call_user_func_array($callable, array_merge([$value], $args));
        }

        return $value;
    }
public function mutate ( $ value , $ callables ) { if ( ! is_array ( $ callables ) ) { $ callables = explode ( '|' , $ callables ) ; } foreach ( $ callables as $ callable ) { list ( $ callable , $ args ) = $ this -> parse ( trim ( $ callable ) ) ; $ value = call_user_func_array ( $ callable , array_merge ( [ $ value ] , $ args ) ) ; } return $ value ; }
Mutate value using provided methods.

@param  mixed $value
@param  string|array $callables
@return mixed

@throws \LogicException
Mutate value using provided methods .