src/Controller/AccueilController.php line 21

Open in your IDE?
  1. <?php
  2. namespace App\Controller;
  3. use App\Service\AppService;
  4. use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
  5. use Symfony\Component\HttpFoundation\Response;
  6. use Symfony\Component\HttpFoundation\Session\Session;
  7. use Symfony\Component\Routing\Annotation\Route;
  8. class AccueilController extends AbstractController
  9. {
  10. public function __construct(AppService $appService)
  11. {
  12. // $appService->checkUrl() ;
  13. }
  14. /**
  15. * @Route("/", name="app_accueil")
  16. */
  17. public function index(): Response
  18. {
  19. // thanks to the type-hint, the container will instantiate a
  20. // new MessageGenerator and pass it to you!
  21. // // ...
  22. // $message = $appService->getHappyMessage();
  23. // $this->addFlash('success', $message);
  24. // // ...
  25. // // $ses = $this->get('session')->getFlash('success') ;
  26. // // retrieve the flash bag from the session
  27. // $flashBag = $this->get('session')->getFlashBag();
  28. // // retrieve the success flash messages
  29. // $successMessages = $flashBag->get('success');
  30. // return $this->render('accueil/index.html.twig',[
  31. return $this->render('accueil/accueil.html.twig',[
  32. // 'messageFlash' => $successMessages
  33. ]);
  34. }
  35. }