I need some help because I didn't succeed in finding the source of my route problem.
Here is my routing.yml
:
gstyle39VideothequeBundle:
resource: "@gstyle39VideothequeBundle/Resources/config/routing.yml"
prefix: /videotheque
The routing.yml
in VideothequeBundle/Resources/config/
:
VideothequeBundle_homepage:
pattern: /
defaults: { _controller: gstyle39VideothequeBundle:Videotheque:index }
My controller:
<?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");
}
}
For my part I did a "cache:clear", a "router:debug" which detected my route:
VideothequeBundle_homepage ANY /videotheque/
I also manually deleted the folder app/cache
...
IMHO you didn't add routing definition in application global routing.yml (app/config/routing.yml).
Look at my routing definitions in https://github.com/drupalmk/Jobeeto
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.