Created
November 14, 2009 22:33
-
-
Save hanse/234814 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 | |
post('/posts', function($params) { | |
// implementation code for post creation | |
}); | |
put('/posts/(?P<id>\d+)', function($params) { | |
// write code to update a post | |
}); | |
delete('/posts/(?P<id>\d+)', function($params) { | |
// write code to delete a post | |
}); | |
get('/archives(/(?P<year>\d{2,4}))?(/(?P<month>\d{1,2}))?(/(?P<slug>[\w-]+))?', function($params) { | |
/* | |
Display an archive. year, month and slug are optional parameters | |
*/ | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment