My controller is /src/AppBundle/Controller/TestsController.php and the class is:
class TestsController extends Controller
{
/**
* @Route("/tests/index", name="testsIndex")
*/
public function indexAction(Request $request)
{
return $this->render('AppBundle::tests\index.html.twig', [
'text' => "Hello world"
]);
}
}
My view is /src/AppBundle/Resources/views/tests/index.html.twig and contains:
{{text}}
But when I try to open http://localhost/project/web/tests/index the error shows:
Unable to find template "AppBundle::tests/index.html.twig" (looked into: D:\www\project\app/Resources/views, D:\www\project\vendor\symfony\symfony\src\Symfony\Bridge\Twig/Resources/views/Form).
I followed this thread which error is pretty much the same but still can't find the mistake. It's driving me nuts.
Unable to find template in Symfony 3
Thanks!