@@ -103,10 +103,10 @@ public function new(
103103 $ submit = $ form ->get ('saveAndCreateNew ' );
104104
105105 if ($ submit ->isClicked ()) {
106- return $ this ->redirectToRoute ('admin_post_new ' );
106+ return $ this ->redirectToRoute ('admin_post_new ' , [], Response:: HTTP_SEE_OTHER );
107107 }
108108
109- return $ this ->redirectToRoute ('admin_post_index ' );
109+ return $ this ->redirectToRoute ('admin_post_index ' , [], Response:: HTTP_SEE_OTHER );
110110 }
111111
112112 return $ this ->render ('admin/blog/new.html.twig ' , [
@@ -144,7 +144,7 @@ public function edit(Request $request, Post $post, EntityManagerInterface $entit
144144 $ entityManager ->flush ();
145145 $ this ->addFlash ('success ' , 'post.updated_successfully ' );
146146
147- return $ this ->redirectToRoute ('admin_post_edit ' , ['id ' => $ post ->getId ()]);
147+ return $ this ->redirectToRoute ('admin_post_edit ' , ['id ' => $ post ->getId ()], Response:: HTTP_SEE_OTHER );
148148 }
149149
150150 return $ this ->render ('admin/blog/edit.html.twig ' , [
@@ -164,7 +164,7 @@ public function delete(Request $request, Post $post, EntityManagerInterface $ent
164164 $ token = $ request ->request ->get ('token ' );
165165
166166 if (!$ this ->isCsrfTokenValid ('delete ' , $ token )) {
167- return $ this ->redirectToRoute ('admin_post_index ' );
167+ return $ this ->redirectToRoute ('admin_post_index ' , [], Response:: HTTP_SEE_OTHER );
168168 }
169169
170170 // Delete the tags associated with this blog post. This is done automatically
@@ -177,6 +177,6 @@ public function delete(Request $request, Post $post, EntityManagerInterface $ent
177177
178178 $ this ->addFlash ('success ' , 'post.deleted_successfully ' );
179179
180- return $ this ->redirectToRoute ('admin_post_index ' );
180+ return $ this ->redirectToRoute ('admin_post_index ' , [], Response:: HTTP_SEE_OTHER );
181181 }
182182}
0 commit comments