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/
|
||||
/assets/vendor/
|
||||
###< symfony/asset-mapper ###
|
||||
|
||||
.php-cs-fixer.*
|
||||
|
|
|
|||
|
|
@ -2,17 +2,15 @@
|
|||
|
||||
namespace App\Controller;
|
||||
|
||||
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
use Symfony\Component\Routing\Attribute\Route;
|
||||
|
||||
class IndexController
|
||||
class IndexController extends AbstractController
|
||||
{
|
||||
#[Route('/')]
|
||||
public function index(): Response
|
||||
{
|
||||
return new Response(
|
||||
'<html><head><title>Test</title></head><body>Body</body></html>'
|
||||
);
|
||||
return $this->render('index/page.html.twig');
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
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