2015-10-16 88 views
0

我設立一個新的Symfony2項目 我的routing.yml找不到我的控制器Symfony2的路由找不到控制器

我控制器位於:

src/Bank/SNSBundle/Controller/HomeController.php

在我的應用程序/配置

/使用routing.yml:

home: 
    path: /blah 
    defaults: { _controler: BankSNSBundle:Home:Index} 

,這是我家的控制器:

<?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")); 
     } 
    } 

當我去/等等我得到這個錯誤:

Unable to find the controller for path "/blah". The route is wrongly configured.

可以annyone Telle公司我有什麼錯我的代碼?

拉爾夫

回答

4

也許一個錯字:

的默認值:{_Control ER:BankSNSBundle:主頁:索引}

(控制器2 「L」)

+0

糟糕,是的錯字,非常感謝 –