Relational RESTful controllers routes ===================================== Sometimes it's better to place subresource actions in their own controller, especially when you have more than 2 subresource actions. Resource collection ------------------- In this case, you must first specify resource relations in special rest YML or XML collection: .. code-block:: yaml # src/Acme/HelloBundle/Resources/config/users_routes.yml users: type: rest host: hostname.example.com resource: Acme\HelloBundle\Controller\UsersController comments: type: rest host: hostname.example.com parent: users resource: Acme\HelloBundle\Controller\CommentsController .. code-block:: xml Notice ``parent: users`` option in the second case. This option specifies that the comments resource is child of the users resource. It is also necessary to add ``type: rest`` to the ``routes.yaml`` file: .. code-block:: yaml acme_hello: type: rest host: hostname.example.com resource: "@AcmeHelloBundle/Resources/config/users_routes.yml" In this case, your ``UsersController`` MUST always have a single resource ``get...`` action: .. code-block:: php