src/Controller/Index.php line 19

Open in your IDE?
  1. <?php
  2. namespace App\Controller;
  3. use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
  4. use Symfony\Component\HttpFoundation\Response;
  5. use Symfony\Component\Routing\Annotation\Route;
  6. class Index extends AbstractController
  7. {
  8.     #[
  9.         Route(
  10.             '/{path}',
  11.             name'home',
  12.             defaults: ['path' => ''],
  13.             requirements: ['path' => '^((?!(api|_)).)*$']
  14.         )
  15.     ]
  16.     public function indexAction(): Response
  17.     {
  18.         // if (1 !== preg_match("/^\/login/", $request->getPathInfo()) && !$authChecker->isGranted('IS_AUTHENTICATED_FULLY')) {
  19.         //     return $this->redirect('/login');
  20.         // }
  21.         return $this->render('index.twig');
  22.     }
  23. }