updateeeeee

This commit is contained in:
lubiana 2025-06-10 20:14:19 +02:00
parent 0c758749e0
commit ca9819a436
Signed by: lubiana
SSH key fingerprint: SHA256:vW1EA0fRR3Fw+dD/sM0K+x3Il2gSry6YRYHqOeQwrfk
12 changed files with 214 additions and 156 deletions

View file

@ -4,6 +4,7 @@ declare(strict_types=1);
namespace App\Controller;
use App\Repository\DrinkTypeRepository;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Attribute\Route;
@ -11,8 +12,11 @@ use Symfony\Component\Routing\Attribute\Route;
#[Route(path: '/', name: 'app_index')]
final class Index extends AbstractController
{
public function __invoke(): Response
public function __invoke(DrinkTypeRepository $drinkTypeRepository): Response
{
return new Response('<h1>Hello World!</h1>');
return $this->render('index.html.twig', [
'drinkTypes' => $drinkTypeRepository->findWanted(),
]);
}
}