Skip to content

Commit

Permalink
Merge pull request #8430 from cakephp/issue-8419
Browse files Browse the repository at this point in the history
Add example of inflect option to RouteBuilder::resources()
  • Loading branch information
ADmad committed Mar 9, 2016
2 parents 127a75a + 60aca56 commit 8b7d392
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/Routing/RouteBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -270,6 +270,14 @@ public function namePrefix($value = null)
* By default the path segment will match the key name. You can use the 'path' key inside the resource
* definition to customize the path name.
*
* You can use the `inflect` option to change how path segments are generated:
*
* ```
* $routes->resources('PaymentTypes', ['inflect' => 'dasherize']);
* ```
*
* Will generate routes like `/payment-types` instead of `/payment_types`
*
* ### Options:
*
* - 'id' - The regular expression fragment to use when matching IDs. By default, matches
Expand Down

0 comments on commit 8b7d392

Please sign in to comment.