Skip to content

Commit 964fbda

Browse files
authored
Use redirectToRoute
instead of $this->redirect($this->generateUrl('...'))
1 parent 35c288c commit 964fbda

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

controller/upload_file.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ Finally, you need to update the code of the controller that handles the form::
170170

171171
// ... persist the $product variable or any other work
172172

173-
return $this->redirect($this->generateUrl('app_product_list'));
173+
return $this->redirectToRoute('app_product_list');
174174
}
175175

176176
return $this->render('product/new.html.twig', [

0 commit comments

Comments
 (0)