src/Controller/DefaultController.php line 14

Open in your IDE?
  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 DefaultController extends AbstractController {
  7.     /**
  8.      * @Route("/", name="home")
  9.      */
  10.     public function index() {
  11.         $date = new \DateTime('2023-03-31');
  12.         $date->modify('last sunday of this month');
  13.         dump($date->format('d/m/Y'));
  14.         $date = new \DateTime('2023-10-31');
  15.         $date->modify('last sunday of this month');
  16.         dump($date->format('d/m/Y'));
  17.         return $this->render('default/index.html.twig');
  18.     }
  19.     /**
  20.      * @Route("/carte", name="carte")
  21.      */
  22.     public function carte() {
  23.         return $this->render('carte/carte.html.twig');
  24.     }
  25. }