Skip to content

Commit

Permalink
RouteBuilder: Update docblocks with 'path' in $params
Browse files Browse the repository at this point in the history
  • Loading branch information
rchavik committed May 25, 2017
1 parent b198e65 commit a51f6c7
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion src/Routing/RouteBuilder.php
Expand Up @@ -587,14 +587,25 @@ public function redirect($route, $url, array $options = [])
* This method creates a scoped route collection that includes
* relevant prefix information.
*
* The path parameter is used to generate the routing parameter name.
* The $name parameter is used to generate the routing parameter name.
* For example a path of `admin` would result in `'prefix' => 'admin'` being
* applied to all connected routes.
*
* You can re-open a prefix as many times as necessary, as well as nest prefixes.
* Nested prefixes will result in prefix values like `admin/api` which translates
* to the `Controller\Admin\Api\` namespace.
*
* If you need to have prefix with dots, eg: '/api/v1.0', use 'path' key
* for $params argument:
*
* ```
* $route->prefix('api', function($route) {
* $route->prefix('v10', ['path' => '/v1.0'], function($route) {
* // Translates to `Controller\Api\V10\` namespace
* });
* });
* ```
*
* @param string $name The prefix name to use.
* @param array|callable $params An array of routing defaults to add to each connected route.
* If you have no parameters, this argument can be a callable.
Expand Down

0 comments on commit a51f6c7

Please sign in to comment.