die in Quelle dieser Methode Werfen wir einen Blick:
/**
* Returns a RedirectResponse to the given route with the given parameters.
*
* @param string $route The name of the route
* @param array $parameters An array of parameters
* @param int $status The status code to use for the Response
*
* @return RedirectResponse
*/
protected function redirectToRoute($route, array $parameters = array(), $status = 302)
{
return $this->redirect($this->generateUrl($route, $parameters), $status);
}
Wie Sie das zweite Argument $parameters
ist zu sehen.
So übergeben Sie sie einfach als Array als zweites Argument.
$this->redirectToRoute('show_page', array('id' => 123));
Vielen Dank @dragoste! –