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