symfony2 YAML routes


Example

Instead of annotations, you can also specify your routes as YAML:

app_index:
    path: /index
    defaults: { _controller: AppBundle:Acme:index }

The same options apply to both annotations and YAML configurations. To import a YAML routing configuration in your root routing configuration, you don't need to specify a type:

app:
    prefix: /app
    resource: "@AppBundle/Resources/config/routing.yml"