Skip to content

Commit 31946f8

Browse files
authored
Update README.md
1 parent 3c62c5f commit 31946f8

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,10 +112,12 @@ The middleware does basically two things:
112112
for e.g. `/en`. The langauge is redirects to depends on the configuration keys
113113
`detectLanguage` and `defaultLanguage` shown above.
114114

115-
Now in order to prevent CakePHP from complaining about missing route for `/`
115+
Now in order to prevent CakePHP from complaining about missing route for `/`,
116116
you must connect a route for `/` to a controller action. That controller action
117117
will never be actually called as the middleware will intercept and redirect
118118
the request.
119+
120+
For e.g. `$routes->connect('/', ['controller' => 'Foo']);`
119121

120122
2. When accesing any URL with language prefix it set's the app's locale based
121123
on the prefix. For that it checks the value of `lang` route element in current

0 commit comments

Comments
 (0)