src/Controller/DashboardController.php line 20

  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. use Symfony\Component\HttpFoundation\RedirectResponse;
  7. class DashboardController extends AbstractController
  8. {
  9.     #[Route('/'name'app_start')]
  10.     public function index(): RedirectResponse
  11.     {
  12.         return $this->redirect($this->generateUrl('app_dashboard'));
  13.     }
  14.     #[Route('/admin/dashboard'name'app_dashboard')]
  15.     public function dashboard(): Response
  16.     {
  17.         return $this->render('dashboard/index.html.twig', [
  18.             'controller_name' => 'DashboardController',
  19.         ]);
  20.     }
  21. }