I am using symfony 3.2.4 (got with console --version). I am working the openclassroom tutorial. That controller always return the error below. Nevertheless, the file below exist with and is accessible.
src/OC/PlatformBundle/Resources/views/Advert/index.html.twig
I got crazy with that. Does someone have an idea ?
Thanks in advance.
<?php
// src/OC/PlatformBundle/Controller/AdvertController.php
namespace OC\PlatformBundle\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\Response;
class AdvertController extends Controller
{
public function indexAction()
{
$content = $this->get('templating')->render('OCPlatformBundle:Advert:index.html.twig');
return new Response($content);
}
}
Unable to find template "OCPlatformBundle:Advert:index.html.twig" (looked into: /var/www/html/symfony/app/Resources/views, /var/www/html/symfony/vendor/symfony/symfony/src/Symfony/Bridge/Twig/Resources/views/Form).
*
AppKernel
, but that would not make sense, wouldn't it? – Jovan Perovic