src/Controller/HomeController.php line 25

Open in your IDE?
  1. <?php
  2. namespace App\Controller;
  3. use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
  4. use Symfony\Component\Routing\Annotation\Route;
  5. use Symfony\Component\HttpFoundation\Request;
  6. use Sensio\Bundle\FrameworkExtraBundle\Configuration\Method;
  7. use App\Service\LocaleSubscriber;
  8. use Symfony\Component\HttpFoundation\RedirectResponse;
  9. use Symfony\Component\HttpFoundation\Session\SessionInterface;
  10. /**
  11. * @Route("/",locale="fr", requirements={
  12. * "_locale": "en|fr",
  13. * "_format": "html|xml",
  14. * })
  15. */
  16. class HomeController extends AbstractController
  17. {
  18. /**
  19. * @Route("/", name="index")
  20. */
  21. public function home()
  22. {
  23. return $this->redirectToRoute('home');
  24. }
  25. }