src/Controller/DashboardController.php line 12

  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 DashboardController extends AbstractController
  7. {
  8.     #[Route('/'name'app_dashboard')]
  9.     public function index(): Response
  10.     {
  11.         if (empty($this->getUser())){
  12.             return $this->redirectToRoute('app_login');
  13.         }
  14.         return $this->render('dashboard/index.html.twig', [
  15.         ]);
  16.     }
  17. }