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

Commitf7e869e

Browse files
committed
minor#10373 Mentioned how to redirect and maintain the query string (javiereguiluz)
This PR was merged into the 2.8 branch.Discussion----------Mentioned how to redirect and maintain the query stringThisfixessymfony/symfony#27482.Commits-------71d6ab1 Mentioned how to redirect and maintain the query string
2 parentsc0ba800 +71d6ab1 commitf7e869e

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