|
47 | 47 | .. important:: The routes are matched in the order they are specified, so if you have a resource photos above a get 'photos/poll' the show action's route for the resource line will be matched before the get line. To fix this, move the get line above the resource line so that it is matched first. |
48 | 48 |
|
49 | 49 | The second parameter accepts an array of options that can be used to modify the routes that are generated. While these |
50 | | -routes are geared toward API-usage, where more methods are allowed, you can pass in the 'websafe' option to have it |
| 50 | +routes are geared toward API-usage, where more methods are allowed, you can pass in the ``websafe`` option to have it |
51 | 51 | generate update and delete methods that work with HTML forms:: |
52 | 52 |
|
53 | 53 | $routes->resource('photos', ['websafe' => 1]); |
@@ -90,15 +90,15 @@ Otherwise you can remove unused routes with the ``except`` option. This option r |
90 | 90 |
|
91 | 91 | $routes->resource('photos', ['except' => 'new,edit']); |
92 | 92 |
|
93 | | -Valid methods are: index, show, create, update, new, edit and delete. |
| 93 | +Valid methods are: ``index``, ``show``, ``create``, ``update``, ``new``, ``edit`` and ``delete``. |
94 | 94 |
|
95 | 95 | ResourceController |
96 | 96 | ============================================================ |
97 | 97 |
|
98 | | -The `ResourceController` provides a convenient starting point for your RESTful API, |
| 98 | +The ``ResourceController`` provides a convenient starting point for your RESTful API, |
99 | 99 | with methods that correspond to the resource routes above. |
100 | 100 |
|
101 | | -Extend it, over-riding the `modelName` and `format` properties, and then |
| 101 | +Extend it, over-riding the ``modelName`` and ``format`` properties, and then |
102 | 102 | implement those methods that you want handled.:: |
103 | 103 |
|
104 | 104 | <?php |
@@ -195,16 +195,16 @@ Otherwise you can remove unused routes with the ``except`` option. This option r |
195 | 195 |
|
196 | 196 | $routes->presenter('photos', ['except' => 'new,edit']); |
197 | 197 |
|
198 | | -Valid methods are: index, show, new, create, edit, update, remove and delete. |
| 198 | +Valid methods are: ``index``, ``show``, ``new``, ``create``, ``edit``, ``update``, ``remove`` and ``delete``. |
199 | 199 |
|
200 | 200 | ResourcePresenter |
201 | 201 | ============================================================ |
202 | 202 |
|
203 | | -The `ResourcePresenter` provides a convenient starting point for presenting views |
| 203 | +The ``ResourcePresenter`` provides a convenient starting point for presenting views |
204 | 204 | of your resource, and processing data from forms in those views, |
205 | 205 | with methods that align to the resource routes above. |
206 | 206 |
|
207 | | -Extend it, over-riding the `modelName` property, and then |
| 207 | +Extend it, over-riding the ``modelName`` property, and then |
208 | 208 | implement those methods that you want handled.:: |
209 | 209 |
|
210 | 210 | <?php |
|
0 commit comments