I want to redirect and send my request to another route but this method is not working.
return $this->redirect($this->generateUrl(
'admin_platform_create',
array('request' => $request)
));
When I arrive into admin_platform_create it doesn't pass that if
public function createAction(Request $request)
{
if ($request->getMethod() == 'POST')
{
Though this is working,
return $this->forward('AdminPlatformBundle:Manage:edit',
array('request' => $request));
It is not what I need as it is not writing the new URL.
Thanks for your help!
If you are using Symfony 2.6 or later, you can do it:
return $this->redirectToRoute('route', [
'request' => $request
], 307);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With