How send Id to my view in redictionRoute Symfony

(Sorry for my english)

I’m making a subscribe system
(the flush is ok in database) than:

return $this->redirectToRoute('organize_home',);

My Route of redirection needs an Id

/**
 * @Route("/mon-compte/{id}", name="organize_home")
 */
public function accountHomepage(User $user)
{
    return $this->render('user/organize_home.html.twig');
}

How can I send this id to the redirection ?

I tried to play with the user object but no success

Thanks you

Source: Symfony Questions

Was this helpful?

0 / 0

Leave a Reply 0

Your email address will not be published. Required fields are marked *