Skip to content

Instantly share code, notes, and snippets.

@exts
Created January 5, 2017 03:06
Show Gist options
  • Save exts/d3958bdcfa59510b2c7124fa6e20aded to your computer and use it in GitHub Desktop.
Save exts/d3958bdcfa59510b2c7124fa6e20aded to your computer and use it in GitHub Desktop.
<?php
$app = new \Slim\App();
$app->group('/users/{id:[0-9]+}', function () {
$this->map(['GET', 'DELETE', 'PATCH', 'PUT'], '', function ($request, $response, $args) {
// Find, delete, patch or replace user identified by $args['id']
})->setName('user');
$this->get('/reset-password', function ($request, $response, $args) {
// Route for /users/{id:[0-9]+}/reset-password
// Reset the password for user identified by $args['id']
})->setName('user-password-reset');
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment