protected function callableOrFail(string $operator): callable
    {
        $callable = $this->config($operator, 'callable');

        if (is_string($callable) && method_exists($this->model, $callable)) {
            return [$this->model, $callable];
        }

        if (is_callable($callable)) {
            return $callable;
        }

        throw new DynamicMutatorNotCallableException('The given callable is invalid!', 0, null, [
            'callable' => $callable,
            'handler'  => $this->getName(),
        ]);
    }
protected function callableOrFail(string $operator): callable
    {
        $callable = $this->config($operator, 'callable');

        if (is_string($callable) && method_exists($this->model, $callable)) {
            return [$this->model, $callable];
        }

        if (is_callable($callable)) {
            return $callable;
        }

        throw new DynamicMutatorNotCallableException('The given callable is invalid!', 0, null, [
            'callable' => $callable,
            'handler'  => $this->getName(),
        ]);
    }
protected function callableOrFail ( string $ operator ) : callable { $ callable = $ this -> config ( $ operator , 'callable' ) ; if ( is_string ( $ callable ) && method_exists ( $ this -> model , $ callable ) ) { return [ $ this -> model , $ callable ] ; } if ( is_callable ( $ callable ) ) { return $ callable ; } throw new DynamicMutatorNotCallableException ( 'The given callable is invalid!' , 0 , null , [ 'callable' => $ callable , 'handler' => $ this -> getName ( ) , ] ) ; }
Get callable or throw an exception.

@param $callable

@throws DynamicMutatorNotCallableException

@return callable
Get callable or throw an exception .