Skip to content

Instantly share code, notes, and snippets.

@Maksclub
Last active May 15, 2018 04:59
Show Gist options
  • Save Maksclub/e09b1f4ad82b53b813ceb8a3043a878b to your computer and use it in GitHub Desktop.
Save Maksclub/e09b1f4ad82b53b813ceb8a3043a878b to your computer and use it in GitHub Desktop.
Статья про роутинг, код 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