Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit71d6ab1

Browse files
committed
Mentioned how to redirect and maintain the query string
1 parentc0ba800 commit71d6ab1

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

‎controller.rst‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,9 @@ and ``redirect()`` methods::
176176
// redirects to a route with parameters
177177
return $this->redirectToRoute('blog_show', array('slug' => 'my-page'));
178178

179+
// redirects to a route and mantains the original query string parameters
180+
return $this->redirectToRoute('blog_show', $request->query->all());
181+
179182
// redirects externally
180183
return $this->redirect('http://symfony.com/doc');
181184
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp