Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
skipperbent committed Oct 17, 2015
1 parent b6f0f68 commit 4edf6aa
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,16 @@ Add the latest version pf Simple PHP Router to your ```composer.json```
}
```

## Notes

### Features currently "in-the-works"

- Global Constraints
- Named Routes
- Sub-Domain Routing
- CSRF Protection
- Optinal/required parameters

## Initialising the router

In your ```index.php``` require your ```routes.php``` and call the ```routeRequest()``` method when all your custom routes has been loaded. This will trigger and do the actual routing of the requests.
Expand Down Expand Up @@ -56,7 +66,8 @@ SimpleRouter::group(['prefix' => 'v1', 'middleware' => '\MyWebsite\Middleware\So

SimpleRouter::group(['prefix' => 'services'], function() {

SimpleRouter::get('/answers/{id}', 'ControllerAnswers@show');
SimpleRouter::get('/answers/{id}', 'ControllerAnswers@show')
->where(['id' => '[0-9]+');

// Resetful ressource
SimpleRouter::ressource('/rest', 'ControllerRessource');
Expand Down

0 comments on commit 4edf6aa

Please sign in to comment.