[英]Symfony 2 - No route found for “GET /videotheque”
我需要一些幫助,因為我沒有成功找到路線問題的根源。
這是我的routing.yml
:
gstyle39VideothequeBundle:
resource: "@gstyle39VideothequeBundle/Resources/config/routing.yml"
prefix: /videotheque
VideothequeBundle/Resources/config/
的routing.yml
:
VideothequeBundle_homepage:
pattern: /
defaults: { _controller: gstyle39VideothequeBundle:Videotheque:index }
我的控制器:
<?php
namespace gstyle39\VideothequeBundle\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
use Symfony\Component\HttpFoundation\Response;
class VideothequeController extends Controller
{
public function indexAction()
{
return new Response("Kikoo");
}
}
就我而言,我做了一個“ cache:clear”,一個“ router:debug”,它檢測了我的路線:
VideothequeBundle_homepage ANY /videotheque/
我還手動刪除了文件夾app/cache
...
恕我直言,您沒有在應用程序全局routing.yml(app / config / routing.yml)中添加路由定義。
在https://github.com/drupalmk/Jobeeto中查看我的路由定義
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.