vibe
This commit is contained in:
parent
837cfb6d43
commit
939840a3ac
76 changed files with 6636 additions and 83 deletions
27
src/Controller/Index.php
Normal file
27
src/Controller/Index.php
Normal 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,
|
||||
]);
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue