I am new to symfony2. I am creating a simple page for "Hello {Name}" and using WAMP. and my routing.yml is as follows
projectnew_bundle:
resource: "@projectnew_bundle/Resources/config/routing.yml"
type: annotation
prefix: /start
and my @projectnew_bundle/Resources/config/routing.yml is as follows (projectnew_bundle is the namespace for \project\new_bundle in src folder) :
projectnew_bundle_hello:
pattern: start/hello/{name}
defaults: { _controller: projectnew_bundle:Start:hello }
I have also registered the bundle projectnew_bundle in AppKernel.php using "new project\new_bundle\projectnew_bundle()"
syntax. My \src\project\new_bundle\projectnew_bundle.php
is as follows:
<?php
namespace project\new_bundle;
use Symfony\Component\HttpKernel\Bundle\Bundle;
class projectnew_bundle extends Bundle
{
}
But, when I try to load the following URL : "http://localhost/symfony_project/Symfony/web/app_dev.php/start/hello/Riten" , it gives the 500 internal server error:
Cannot load resource
"@projectnew_bundle/Resources/config/routing.yml"
. Make sure the"projectnew_bundle/Resources/config/routing.yml"
bundle is correctly registered and loaded in the application kernel class.