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

Route

Hello, I want to use this syntaxe in a route:

$this->redirect(array("for" => "countries-list"));

But i will have and some params like id and the question is how can I pass additional params if i want to use this syntax?

Does exist something like :$this->redirect(array("for" => "countries-list","param1" => $id)); ???



98.9k
Accepted
answer

Yes, just pass the parameters as:

$this->redirect(array("for" => "countries-list", "id" => 100));