I am very new to symfony. In other languages like java and others I can use request.getParameter(\'parmeter name\')
to get the value.
Is there anything
As now $this->getRequest()
method is deprecated you need to inject Request
object into your controller action like this:
public function someAction(Request $request)
after that you can use one of the following.
If you want to fetch POST data from request use following:
$request->request->get('var_name');
but if you want to fetch GET data from request use this:
$request->query->get('var_name');