Reputation: 741
I am setting up a new symfony2 project My routing.yml can't find my controller
My controller is located here:
src/Bank/SNSBundle/Controller/HomeController.php
in my app/config/routing.yml:
home:
path: /blah
defaults: { _controler: BankSNSBundle:Home:Index}
and this is my home controller:
<?php
namespace Bank\SNSBundle\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
class HomeController extends Controller {
/**
* @return \Symfony\Component\HttpFoundation\Response
*/
public function IndexAction(){
return $this->render('BankSNSBundle:Home:index.html.twig', array('name' => "Ralph"));
}
}
when I go to /blah I get this error:
Unable to find the controller for path "/blah". The route is wrongly configured.
can annyone telle me what's wrong with my code?
Ralph
Upvotes: 0
Views: 701
Reputation: 3135
Maybe a Typo:
defaults: { _controller: BankSNSBundle:Home:Index}
(controller with 2 "L")
Upvotes: 4