| Conditions | 1 |
| Paths | 1 |
| Total Lines | 7 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 14 | function apiResource($uri, $controller) |
||
|
|
|||
| 15 | { |
||
| 16 | $this->app->get($uri, $controller.'@index'); |
||
| 17 | $this->app->post($uri, $controller.'@store'); |
||
| 18 | $this->app->get($uri.'/{id}', $controller.'@show'); |
||
| 19 | $this->app->put($uri.'/{id}', $controller.'@update'); |
||
| 20 | $this->app->delete($uri.'/{id}', $controller.'@destroy'); |
||
| 21 | |||
| 37 |
Adding explicit visibility (
private,protected, orpublic) is generally recommend to communicate to other developers how, and from where this method is intended to be used.