Website/app/backend/TestController.php
Snoweuph cabf11cf88
All checks were successful
Quality Check / QS Backend (push) Successful in 19s
Quality Check / QS Mixed (push) Successful in 31s
Quality Check / QS Frontend (push) Successful in 38s
stuff
2024-07-27 22:52:32 +02:00

34 lines
678 B
PHP

<?php
declare(strict_types=1);
namespace App;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\HttpKernel\Attribute\AsController;
use Symfony\Component\Routing\Annotation\Route;
use Twig\Environment;
#[AsController]
#[Route(
path: '/',
name: 'test',
methods: [Request::METHOD_GET]
)]
final readonly class TestController
{
public function __construct(
private Environment $twig,
) {
}
public function __invoke(Request $request): Response
{
return new Response(
$this->twig->render(
'base.html.twig'
)
);
}
}