Closed
Description
Description
What's the best practice for redirecting to the current route (e.g. when following the Post/Redirect/Get pattern)? I'm using
return $this->redirectToRoute($request->get('_route'));
...but since #42392, Request::get()
is marked @internal
.
So what about a new convenience method AbstractController::redirectToCurrentRoute(int $status = 302/303)
?
Or am I missing something and there is another (better) way already? => Then it should be mentioned in https://symfony.com/index.php/doc/current/controller.html#redirecting
Example
No response