public function triggerController(string $controller, ...$args)
    {
        //extract the class and method
        list($class, $method) = explode('@', $controller, 2);

        //if the class exists
        if (class_exists($class)) {
            //instantiate it
            $instance = new $class();

            //does the method exist ?
            if (method_exists($instance, $method)) {
                call_user_func_array([$instance, $method], $args);
            }
        }

        return $this;
    }
public function triggerController(string $controller, ...$args)
    {
        //extract the class and method
        list($class, $method) = explode('@', $controller, 2);

        //if the class exists
        if (class_exists($class)) {
            //instantiate it
            $instance = new $class();

            //does the method exist ?
            if (method_exists($instance, $method)) {
                call_user_func_array([$instance, $method], $args);
            }
        }

        return $this;
    }
public function triggerController ( string $ controller , ... $ args ) { //extract the class and method list ( $ class , $ method ) = explode ( '@' , $ controller , 2 ) ; //if the class exists if ( class_exists ( $ class ) ) { //instantiate it $ instance = new $ class ( ) ; //does the method exist ? if ( method_exists ( $ instance , $ method ) ) { call_user_func_array ( [ $ instance , $ method ] , $ args ) ; } } return $ this ; }
Calls a controller method

@param *string $controller In the form of class@method
@param mixed   ...$args

@return PipeTrait
Calls a controller method