updateeeeee
This commit is contained in:
parent
0c758749e0
commit
ca9819a436
12 changed files with 214 additions and 156 deletions
|
@ -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(),
|
||||
]);
|
||||
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue