@@ -367,27 +367,30 @@ Miscellaneous Functions
367367
368368.. php :function :: route_to($method[, ...$params])
369369
370- :param string $method: The named route alias, or name of the controller/method to match.
371- :param int|string $params: One or more parameters to be passed to be matched in the route. The last parameter allows you to set the locale.
370+ :param string $method: Route name or Controller::method
371+ :param int|string ...$params: One or more parameters to be passed to the route. The last parameter allows you to set the locale.
372+ :returns: a route (URI path)
373+ :rtype: string
372374
373375 .. note :: This function requires the controller/method to have a route defined in **app/Config/routes.php**.
374376
377+ .. important :: ``route_to()`` returns a *route*, not a full URI path for your site.
378+ If your **baseURL ** contains sub folders, the return value is not the same
379+ as the URI to link. In that case, just use :php:func: `url_to() ` instead.
380+ See also :ref: `urls-url-structure `.
381+
375382 Generates a route for you based on a controller::method combination. Will take parameters into effect, if provided.
376383
377384 .. literalinclude :: common_functions/009.php
378385
379- Generates a route for you based on a named route alias .
386+ Generates a route for you based on a route name .
380387
381388 .. literalinclude :: common_functions/010.php
382389
383390 Since v4.3.0, when you use ``{locale} `` in your route, you can optionally specify the locale value as the last parameter.
384391
385392 .. literalinclude :: common_functions/011.php
386393
387- .. note :: ``route_to()`` returns a route, not a full URI path for your site.
388- If your **baseURL ** contains sub folders, the return value is not the same
389- as the URI to link. In that case, just use :php:func: `url_to() ` instead.
390-
391394.. php :function :: service($name[, ...$params])
392395
393396 :param string $name: The name of the service to load
0 commit comments