@@ -103,10 +103,10 @@ public function new(
103
103
$ submit = $ form ->get ('saveAndCreateNew ' );
104
104
105
105
if ($ submit ->isClicked ()) {
106
- return $ this ->redirectToRoute ('admin_post_new ' );
106
+ return $ this ->redirectToRoute ('admin_post_new ' , [], Response:: HTTP_SEE_OTHER );
107
107
}
108
108
109
- return $ this ->redirectToRoute ('admin_post_index ' );
109
+ return $ this ->redirectToRoute ('admin_post_index ' , [], Response:: HTTP_SEE_OTHER );
110
110
}
111
111
112
112
return $ this ->render ('admin/blog/new.html.twig ' , [
@@ -144,7 +144,7 @@ public function edit(Request $request, Post $post, EntityManagerInterface $entit
144
144
$ entityManager ->flush ();
145
145
$ this ->addFlash ('success ' , 'post.updated_successfully ' );
146
146
147
- return $ this ->redirectToRoute ('admin_post_edit ' , ['id ' => $ post ->getId ()]);
147
+ return $ this ->redirectToRoute ('admin_post_edit ' , ['id ' => $ post ->getId ()], Response:: HTTP_SEE_OTHER );
148
148
}
149
149
150
150
return $ this ->render ('admin/blog/edit.html.twig ' , [
@@ -164,7 +164,7 @@ public function delete(Request $request, Post $post, EntityManagerInterface $ent
164
164
$ token = $ request ->request ->get ('token ' );
165
165
166
166
if (!$ this ->isCsrfTokenValid ('delete ' , $ token )) {
167
- return $ this ->redirectToRoute ('admin_post_index ' );
167
+ return $ this ->redirectToRoute ('admin_post_index ' , [], Response:: HTTP_SEE_OTHER );
168
168
}
169
169
170
170
// 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
177
177
178
178
$ this ->addFlash ('success ' , 'post.deleted_successfully ' );
179
179
180
- return $ this ->redirectToRoute ('admin_post_index ' );
180
+ return $ this ->redirectToRoute ('admin_post_index ' , [], Response:: HTTP_SEE_OTHER );
181
181
}
182
182
}
0 commit comments