src/Controller/DefaultController.php line 22

Open in your IDE?
  1. <?php
  2. // src/Controller/Defaultontroller.php
  3. namespace App\Controller;
  4. use Symfony\Component\Routing\Annotation\Route;
  5. use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
  6. use Symfony\Component\HttpFoundation\Response;
  7. class DefaultController  extends AbstractController
  8. {
  9.     /**
  10.      * @Route("/admin")
  11.      */
  12.     public function admin()
  13.     {
  14.         return new Response('<html><body>Admin page!</body></html>');
  15.     }
  16.     /**
  17.      * @Route("/", name="welcome")
  18.      */
  19.     public function index()
  20.     {
  21.         return $this->render('accueil/dmhome.html.twig', array(
  22.         ));
  23.     }
  24.     public function autreindex()
  25.     {
  26.         return new Response(
  27.             '<!doctype html>
  28. <html lang="fr">
  29. <head>
  30. <meta charset="UTF-8"></head><body>Site de test</body></html>'
  31.         );
  32.     }
  33. }