src/Controller/IndexController.php line 11

  1. <?php
  2. namespace App\Controller;
  3. use App\Controller\Bootstrap\DefaultLayoutController;
  4. use Symfony\Component\HttpFoundation\RedirectResponse;
  5. use Symfony\Component\HttpFoundation\Response;
  6. class IndexController extends DefaultLayoutController
  7. {
  8.     public function index(): Response
  9.     {
  10.         if($this->getUser()){
  11.             return new RedirectResponse($this->generateUrl('dashboard', []));
  12.         }
  13.         return new RedirectResponse($this->generateUrl('signin', []));
  14.     }
  15. }