php - Symfony Yaml based routing doesn't work as generated -


i'm following symfony3 intro.

i ran php bin/console generate:controller , followed prompts, choosing yaml routing because don't comments code.

it generated following:

number:     path:     /lucky/number     defaults: { _controller: appbundle:lucky:number } 

and placed src/appbundle/resources/config/routing.yml

this doesn't work. however, copying contents app/config/routing.yml does.

it seems i'm missing additional config doesn't mention in guide because expects use annotations routes. doesn't mention in docs here under "using other formats" section.

is copying generated route other file right thing do? there alternative step tells find other yaml based routes?

in app/config/routing.yml can do:

app:     resource: '@appbundle/resources/config/routing.yml' 

and write inside of appbundle/resources/config/routing.yml work


Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -