2

How can I set default controller and action in symfony2. Where to configure this settings.

2

2 Answers 2

4

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.

Sign up to request clarification or add additional context in comments.

1 Comment

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.
1

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

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.