I am using Symfony 3.4.4
and getting Twig_Error_Loader:
Unable to find template "MyBundle:Default:index.html.twig" (looked into: /Users/nemanja/sites/SimfoniAplikacija/app/Resources/views, /Users/nemanja/sites/SimfoniAplikacija/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Resources/views/Form).
This is my default controller in MyBundle/Controller
<?php
namespace MyBundle\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
class DefaultController extends Controller
{
/**
* @Route("/my", name="mypage")
*/
public function indexAction()
{
return $this->render('MyBundle:Default:index.html.twig');
}
}
And my index file is where it says: MyBundle/Default/index.html.twig
I tried to change return $this->render('MyBundle:Default:index.html.twig');
to return $this->render('MyBundle/Default/index.html.twig');
But I still get the same error. It can't find index template.