Skip to content

Instantly share code, notes, and snippets.

Last active May 15, 2018 04:59
What would you like to do?
Статья про роутинг, код 12
$collection = new RouterCollection();
$collection->any('/', function() {return('Hello!');});
$collection->get('/blog', function() {return('This is Blog');});
$collection->post('/blog', function($request) {return('Create Post');});
$router = new Riuter($collection);
$result = $router->match();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment