Here is the simple route defined in the custom bundle
my_admin_route:
pattern: /admin/{name}
defaults: { _controller: NamespaceCustomBundle:CustomControl:login }
Above routing code will call the CustomControlController
's method loginAction()
my question is how can i automate the function name in routing like for each function i don't have to define the route again there should be one route and call the function automatically as defined parameter {name}
in the route like below
my_admin_route:
pattern: /admin/{name}
defaults: { _controller: NamespaceCustomBundle:CustomControl:{name} }