Configure routes using annotation

This commit is contained in:
2023-08-02 16:26:25 +02:00
parent 4b20db7a9c
commit 009a0326d9
55 changed files with 215 additions and 772 deletions

View File

@@ -18,6 +18,9 @@ use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
*/
class DefaultController extends AbstractController
{
/**
* @\Symfony\Component\Routing\Annotation\Route(path="/{_locale}/homepage", name="chill_main_homepage")
*/
public function indexAction()
{
if ($this->isGranted('ROLE_ADMIN')) {
@@ -27,6 +30,9 @@ class DefaultController extends AbstractController
return $this->render('@ChillMain/layout.html.twig');
}
/**
* @\Symfony\Component\Routing\Annotation\Route(path="/homepage", name="chill_main_homepage_without_locale")
*/
public function indexWithoutLocaleAction()
{
return $this->redirectToRoute('chill_main_homepage');