Статья про роутинг, код 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