Symfony Redirect a la página anterior
/**
* @Route ("/cart/add/{id}", name = "add_cart")
*/
public function add($id, CartService $cartservice, Request $request){
$cartservice->add($id);
$route = $request->headers->get('referer');
return $this->redirect($route);
}
EnzoK