src/Controller/DashboardController.php line 19

  1. <?php
  2. namespace App\Controller;
  3. use Sensio\Bundle\FrameworkExtraBundle\Configuration\IsGranted;
  4. use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
  5. use Symfony\Component\HttpFoundation\Response;
  6. use Symfony\Component\Routing\Annotation\Route;
  7. #[Route('/')]
  8. #[IsGranted('ROLE_USER')]
  9. class DashboardController extends AbstractController
  10. {
  11.     #[Route(
  12.         '/',
  13.         name'app_index',
  14.         methods: ['GET']
  15.     )]
  16.     public function index(): Response
  17.     {
  18.         return $this->render('index.html.twig');
  19.     }
  20.     #[Route(
  21.         '/parametres',
  22.         name'app_parameters_index',
  23.         methods: ['GET']
  24.     )]
  25.     public function parameters(): Response
  26.     {
  27.         return $this->render('parameters.html.twig');
  28.     }
  29. }