src/Controller/Alis/DashboardController.php line 28

Open in your IDE?
  1. <?php
  2. declare(strict_types=1);
  3. namespace App\Controller\Alis;
  4. use App\Repository\AnnonceRepository;
  5. use App\Repository\ClientRepository;
  6. use App\Repository\SocieteRepository;
  7. use App\Services\EmailSender;
  8. use App\Services\PdfService;
  9. use Endroid\QrCode\Builder\BuilderInterface;
  10. use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
  11. use Symfony\Component\HttpFoundation\BinaryFileResponse;
  12. use Symfony\Component\HttpFoundation\Request;
  13. use Symfony\Component\HttpFoundation\Response;
  14. use Symfony\Component\Routing\Annotation\Route;
  15. use Symfony\Component\Serializer\SerializerInterface;
  16. /**
  17.  * Route("/", host="anitadev.infospid.com")
  18.  */
  19. class DashboardController extends AbstractController
  20. {
  21.     /**
  22.      * @Route("/")
  23.      */
  24.     public function index(Request $request): Response
  25.     {
  26.         if($this->getUser() && $this->getUser()->getUsername() === "dtp") {
  27.             return $this->redirectToRoute("app_alis_greffe_index");
  28.         }
  29.         
  30.         return $this->redirectToRoute("app_alis_parution_index");
  31.         //return $this->render('alis/dashboard/index.html.twig', []);
  32.     }
  33. }