-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathroutes.yaml
27 lines (25 loc) · 974 Bytes
/
routes.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
# config/routes.yaml
controllers:
resource: '../src/Action/'
type: annotation
# redirecting the homepage to route which contains default locale which is the english version
homepage:
path: /
# redirection using a URL
controller: Symfony\Bundle\FrameworkBundle\Controller\RedirectController::urlRedirectAction
# redirection using a route name
#controller: Symfony\Bundle\FrameworkBundle\Controller\RedirectController::redirectAction
defaults:
# redirection using a URL
path: /en
# redirection using a route name combined to default locale parameter
#route: home
permanent: true
# logout
# Logout action is called internally, so route annotation cannot be used for paths definition!
# https://symfony.com/doc/4.2/translation/locale.html
disconnect:
path:
en: /en/logout
# This is an example to show how translate route accordingly to locale parameter.
#fr: /fr/deconnection