Skip to content

v3.1.7

Latest
Compare
Choose a tag to compare
@gigili gigili released this 22 Aug 19:17
72e2879
  • Added support for optional parameters
  • Added more tests
  • Updated documentation in doc blocks

Optional parameters

$routes->add(
    '/demo/{id?}',
    function($id = 'defaultValue'){
    	echo "ID: . $id";
    },
    Routes::GET
);

When calling this endpoint with /demo it will output ID: defaultValue and with /demo/123 it will output ID: 123

Full Changelog: v3.1.6...v3.1.7