Created
January 5, 2017 03:06
-
-
Save exts/d3958bdcfa59510b2c7124fa6e20aded to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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