This commit is contained in:
lubiana 2025-06-08 13:58:51 +02:00
parent 837cfb6d43
commit 939840a3ac
Signed by: lubiana
SSH key fingerprint: SHA256:vW1EA0fRR3Fw+dD/sM0K+x3Il2gSry6YRYHqOeQwrfk
76 changed files with 6636 additions and 83 deletions

27
src/Controller/Index.php Normal file
View file

@ -0,0 +1,27 @@
<?php
declare(strict_types=1);
namespace App\Controller;
use App\Service\InventoryService;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Attribute\Route;
#[Route(path: '/', name: 'app_index')]
final class Index extends AbstractController
{
public function __construct(
private readonly InventoryService $inventoryService,
) {}
public function __invoke(): Response
{
$drinkStocks = $this->inventoryService->getAllDrinkTypesWithStockLevels();
return $this->render('index.html.twig', [
'drinkStocks' => $drinkStocks,
]);
}
}