src/Platform/Controller/HomeController.php line 20

Open in your IDE?
  1. <?php
  2. declare(strict_types=1);
  3. namespace App\Platform\Controller;
  4. use App\Platform\Service\HomeService;
  5. use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
  6. use Symfony\Component\HttpFoundation\Response;
  7. use Symfony\Component\Routing\Annotation\Route;
  8. class HomeController extends AbstractController
  9. {
  10.     public function __construct(
  11.         private readonly HomeService $homeService,
  12.     ) {
  13.     }
  14.     #[Route(path'/'name'app.home')]
  15.     public function elements(): Response
  16.     {
  17.         return $this->render('@base/home.html.twig', [
  18.             'modules' => $this->homeService->getModulesByPermissions(),
  19.         ]);
  20.     }
  21. }