src/Controller/DefaultController.php line 18

  1. <?php
  2. /*
  3.  *  @author Guerby Duval <info@tranzaksyon.com>
  4.  *  @link https://tranzaksyon.com
  5.  *  @copyright You are not allowed to remove this author "Guerby Duval <info@tranzaksyon.com>", the link "https://tranzaksyon.com" neither this copyright.
  6.  */
  7. namespace App\Controller;
  8. use Sensio\Bundle\FrameworkExtraBundle\Configuration\IsGranted;
  9. use Symfony\Component\HttpFoundation\Response;
  10. use Symfony\Component\Routing\Annotation\Route;
  11. #[IsGranted('ROLE_USER')]
  12. class DefaultController extends SriInfoController
  13. {
  14.     #[Route('/'name'app_home')]
  15.     public function index(): Response
  16.     {
  17.         return $this->redirectToRoute('settings_list');
  18.     }
  19.     #[Route('/logout'name'app_logout'methods: ['GET'])]
  20.     public function logout()
  21.     {
  22.         // controller can be blank: it will never be called!
  23.         throw new \Exception('Don\'t forget to activate logout in security.yaml');
  24.     }
  25. }