Answer the question
In order to leave comments, you need to log in
Symfony doesn't see path to twig template after creating new bundle?
bin/console generate:bundle
answer all questions, tried different config formats. But after generation, the path to the template does not work.
Tried on two computers under Linux mint, but everywhere the same result. Apparently I'm doing something wrong. Help
Answer the question
In order to leave comments, you need to log in
Generally understood. Thanks to one specialist.
An essence such - I generated the controller through bin/console
In general a problem in the generator. Version 3.4 has a curve.
It was
<?php
namespace AppBundle\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
class PostController extends Controller
{
/**
* @Route("/index")
*/
public function indexAction()
{
return $this->render('AppBundle:Post:index.html.twig', array(
// ...
));
}
}
<?php
namespace AppBundle\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
class PostController extends Controller
{
/**
* @Route("/index")
*/
public function indexAction()
{
return $this->render('@App/Post/index.html.twig', array(
// ...
));
}
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question