0

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

1 Answer 1

4

Maybe a Typo:

defaults: { _controller: BankSNSBundle:Home:Index}

(controller with 2 "L")

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.