In Symfony 2 I have the following code in my Controller:
// prepare to render the seller info panel
$response = array(
'data' => $data,
);
// render the seller info panel
return $this->redirect($this->generateUrl('route', $response));
where route is:
route:
pattern: /listing/complete/{data}
defaults: { _controller: FooBundle:Foo:action }
requirements:
_method: POST
This doesn't work since the redirect is making a GET request. I've also tried it this pattern, but its not matching the route:
route:
pattern: /listing/complete
defaults: { _controller: FooBundle:Foo:action }
requirements:
_method: POST
I've found the routing documentation unhelpful. Is there a way that I can have the redirect make a POST request? What would the route look like, and do I have to do anything in the controller to make it happen?