Md Mehedi Hasan
Md Mehedi Hasan

Reputation: 1792

How to set default controller and action in symfony2?

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

Upvotes: 2

Views: 8311

Answers (2)

Lightrider87
Lightrider87

Reputation: 49

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.

Upvotes: 4

GOPI
GOPI

Reputation: 1060

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

Upvotes: 1

Related Questions