Reputation: 983
this is my very first time with Symfony, so im trying to make a simple routing inclusion. This is what it have:
public function registerBundles()
{
$bundles = array(
.
.
.
new WSBundle\WSBundle()
);
.
.
.
ws_tiposdivisionmenor:
resource: "@WSBundle/Resources/config/routing.yml"
prefix: /
<?php
namespace WSBundle;
use Symfony\Component\HttpKernel\Bundle\Bundle;
class WSBundle extends Bundle
{
}
tiposdivisionmenor:
path: /ws/tiposDivisionMenor/{id}
defaults: { _controller: WSBundle:TiposDivisionMenor:index }
But im getting this message:
Unable to find file "@WSBundle/Resources/config/routing.yml" in @WSBundle/Resources/config/routing.yml (which is being imported from "....../app/config/routing.yml"). Make sure the "WSBundle" bundle is correctly registered and loaded in the application kernel class. If the bundle is registered, make sure the bundle path "@WSBundle/Resources/config/routing.yml" is not empty.
Any ideas?
Upvotes: 1
Views: 974
Reputation: 36944
You're doing right, you have just missed that you have required @WSBundle/Resources/config/routing.yml
instead of @WSBundle/Resources/config/routes.yml
.
Upvotes: 2