I got a question re calling a method of a different controller from a controller. I have seen this one: https://docs.phalcon.io/en/latest/reference/dispatching.html#forwarding-to-other-actions
Using dispatcher forwarding, it doesn't produce any error. However, it doesn't call the method either. The code is similar to this one
// Forward flow to the index action $this->dispatcher->forward( [ "controller" => "posts", "action" => "index", ] );
Am I missing something?
I am not doing any HTTP redirection. I just need to call a different method from another controller to do the task. These two are different in nature and at some point, the other controller has to use the other (think of it like an exposed method that can be reused by other controlelrs instead of duplicationg the code).