Use twig templating
This commit is contained in:
parent
ba1035fc9a
commit
99b4ca1729
3 changed files with 13 additions and 5 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
|
@ -18,3 +18,5 @@
|
||||||
/public/assets/
|
/public/assets/
|
||||||
/assets/vendor/
|
/assets/vendor/
|
||||||
###< symfony/asset-mapper ###
|
###< symfony/asset-mapper ###
|
||||||
|
|
||||||
|
.php-cs-fixer.*
|
||||||
|
|
|
||||||
|
|
@ -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>'
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
8
templates/index/page.html.twig
Normal file
8
templates/index/page.html.twig
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>Test</title>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
Body Test
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
Loading…
Reference in a new issue