Skip to content

Commit

Permalink
Add example of inflect option.
Browse files Browse the repository at this point in the history
Refs #8419
  • Loading branch information
markstory committed Mar 9, 2016
1 parent 127a75a commit 60aca56
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/Routing/RouteBuilder.php
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 60aca56

Please sign in to comment.