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

How to set parameter to other view in my controller?



85.5k
Accepted
answer
edited Oct '15
$this->view->setVars([
            'type' => $type,
            'form' => new \Forms\Myformr(null, $data),
            'id' => $model->id
        ]);

inside the view


echo $this->view->type;

?

edited Oct '15

inside the view for phtml:

echo $type

volt:

{{ type }}