Maybe this is a stupid question but I spent a lot of time trying to make it working...
This is from my routing file:
search:
path: /search
defaults: { _controller: MyAppBundle:Default:search}
My twig template:
{{ path('search', {'value': value}) }}
And my controller:
public function searchAction(Request $request){
$value = $request->query->get('value');
My problem is the following, with the above data I am generating this url:
/search/value
instead of the url which I want:
/search?value=value
I prefer clean urls, but I need to pass the values in the url using "?" due to that I need to pass different values in the url and some of them can be omitted in different circumstances