Solved thread

This post is marked as solved. If you think the information contained on this thread must be part of the official documentation, please contribute submitting a pull request to its repository.

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)); ???



83.4k
Accepted
answer

Yes, just pass the parameters as:

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