I know that I can access the current route name on $request->get('_route');.
If my route is defined as follows:
/*
* @Route("/get_by_category/{id}", defaults={"id" = 0}, name="get_products_by_category")
*/
How can I get a variable idfrom a service?
source
share