@@ -269,6 +269,8 @@ routes defined within this closure are only accessible from the given environmen
269269
270270.. literalinclude :: routing/028.php
271271
272+ .. _reverse-routing :
273+
272274Reverse Routing
273275===============
274276
@@ -277,12 +279,19 @@ to, and have the router lookup the current route to it. This allows route defini
277279to update your application code. This is typically used within views to create links.
278280
279281For example, if you have a route to a photo gallery that you want to link to, you can use the ``route_to() `` helper
280- function to get the current route that should be used. The first parameter is the fully qualified Controller and method,
282+ function to get the URI path ( route) that should be used. The first parameter is the fully qualified Controller and method,
281283separated by a double colon (``:: ``), much like you would use when writing the initial route itself. Any parameters that
282284should be passed to the route are passed in next:
283285
284286.. literalinclude :: routing/029.php
285287
288+ .. note :: ``route_to()`` returns a URI path for the route, not a full URI path
289+ for your site. If your **baseURL ** contains sub folders, the return value is
290+ not the same as the URI to link. In that case, you need to use :php:func: `site_url `
291+ like ``site_url(route_to(...)) ``, or just use :php:func: `url_to ` instead.
292+
293+ .. _using-named-routes :
294+
286295Using Named Routes
287296==================
288297
@@ -295,6 +304,11 @@ with the name of the route:
295304
296305This has the added benefit of making the views more readable, too.
297306
307+ .. note :: ``route_to()`` returns a URI path for the route, not a full URI path
308+ for your site. If your **baseURL ** contains sub folders, the return value is
309+ not the same as the URI to link. In that case, you need to use :php:func: `site_url `
310+ like ``site_url(route_to(...)) ``, or just use :php:func: `url_to ` instead.
311+
298312Routes with any HTTP verbs
299313==========================
300314
0 commit comments