Пожалуйста, помогите, Symfony 4 не может найти шаблон php.
Ошибка Шаблон "::test/index.html.php" не существует.
Контроллер:
namespace App\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\Response;
class TestController extends Controller
{
public function number()
{
$number = mt_rand(0, 100);
// return new Response(
// '<html><body>Lucky number: '.$number.'</body></html>'
// );
return $this->render("test/number.html.php",
array('number' => $number));
}
function index() {
return $this->render("test/index.html.php");
}
}
Каталоги:
- templates/
- test/
- index.html.php
- номер.html.php
- test/
Спасибо
twig
в качестве шаблонизатора? - person Amit Merchant   schedule 06.02.2018app/
, а есть папкаtemplates/
для шаблонов - person Superbiji   schedule 06.02.2018return $this->render("App:Test:index.html.php");
- person Superbiji   schedule 06.02.2018namespaces
своего контроллера? - person Imanali Mamadiev   schedule 07.02.2018