Use twig templating

This commit is contained in:
myrmidex 2026-06-02 16:46:00 +00:00
parent ba1035fc9a
commit 99b4ca1729
3 changed files with 13 additions and 5 deletions

2
.gitignore vendored
View file

@ -18,3 +18,5 @@
/public/assets/ /public/assets/
/assets/vendor/ /assets/vendor/
###< symfony/asset-mapper ### ###< symfony/asset-mapper ###
.php-cs-fixer.*

View file

@ -2,17 +2,15 @@
namespace App\Controller; namespace App\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Attribute\Route; use Symfony\Component\Routing\Attribute\Route;
class IndexController class IndexController extends AbstractController
{ {
#[Route('/')] #[Route('/')]
public function index(): Response public function index(): Response
{ {
return new Response( return $this->render('index/page.html.twig');
'<html><head><title>Test</title></head><body>Body</body></html>'
);
} }
} }

View file

@ -0,0 +1,8 @@
<html>
<head>
<title>Test</title>
</head>
<body>
Body Test
</body>
</html>