How can I set default controller and action in symfony2. Where to configure this settings.
-
You need to explain your question in a little more detailed way. Default controller/action as in exactly what sense?Ankit Khedekar– Ankit Khedekar2013-10-09 07:07:25 +00:00Commented Oct 9, 2013 at 7:07
-
Do you mean How to create pages? or How to reroute all routes to an action ?Touki– Touki2013-10-09 07:08:53 +00:00Commented Oct 9, 2013 at 7:08
Add a comment
|
2 Answers
Which annotation do you use?
My default Route is in the file app/config/routing.yml
_index:
pattern: /
defaults: { _controller: ACMEUserBundle:Default:index }
If you have installed with DemoBundle there is a Default Route in the file src/Acme/DemoBundle/Resources/config/routing.yml.
1 Comment
Pierre de LESPINAY
For those having the "DefaultController does not exist" Exception (after renaming DefaultController). Don't forget the actual controller's name is the Class name and not the file name.
Look the Link it's show some idea to you
http://symfony.com/doc/current/book/routing.html
cant run the controller with symfony 2