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

Response->redirect with route name

How I can use route name instead of location in redirect() function?



18.5k
Accepted
answer
$this->response->redirect(array('for' => "route-name"));
...
$this->response->redirect(array('for' => "route-name", 'id' => $someId));

Thanks.

$location parameter in Phalcon stubs defined as string $location. I'm confused.