We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

forward

    $post['roller_id'] = $rollerInfo->id;
    $post['created_at'] = date("Y-m-d H:i:s", time());

    if ($this->model_family->create($post)) {
       $aa = $this -> dispatcher -> forward(array(
        'controller'    =>  'roller',
        'action'    =>  'saveStatus',
        'params'    =>  array('id'  =>  3)
        ));
    }

    $this->response->redirect($this->request->getHeader('REFERER'));

I want to cross the controller calls continue to execute the following code, but he did not perform this code across controller calls, predecessors, if I do that?$aa does not return anything...



98.9k

$this->dispatcher->forward is not supposed to return anything, it just changes the current controller/action in the dispatch loop.