Skip to content

Instantly share code, notes, and snippets.

@gayanhewa
Created December 8, 2016 12:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gayanhewa/583c3237627b6908b3883b54220e91c5 to your computer and use it in GitHub Desktop.
Save gayanhewa/583c3237627b6908b3883b54220e91c5 to your computer and use it in GitHub Desktop.
Adding Routes
// Using a closure
$router->add('GET', '/', function() {
echo "Hello World";
});
// Using class method mapping
$route->add('GET', '/new/route', ClassName::class, 'method');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment