Symfony2: No route found for “GET /lucky/number”

后端 未结 11 1237
北荒
北荒 2021-02-18 14:17

I start the tutorial (as newbie) and everythings works fine till:

http://symfony.com/doc/current/book/page_creation.html#creating-a-page-route-and-controller at step

11条回答
  •  攒了一身酷
    2021-02-18 15:15

    Another reason you might get a "No route found for "GET /luck/number" is because you have a tab in front of the @Route annotation. I thought I programmed my code exactly like the example, and was getting this error, but turned out it was the tab.

    See the following code below, and notice the first one produces the "No Route found..." exception:

    /**
     *  @Route("/lucky/number")
     */
    
     /**
     * @Route("/lucky/number")
     */
    

提交回复
热议问题