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} }
you can look at KNP Rad Bundle: http://rad.knplabs.com/
It does a lot of good things including the one you are talking about
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With