Is there any way I can declare optional parameters in the url ?
-> (..) addGetRoute('products/(.*)/(.*)', function(){ $product = new Product(get_registry()); $product->getProducts(); }) (..)
For this url I have to supply 2 arguments. How can I make it work without them?
Is there any way I can declare optional parameters in the url ?
-> (..) addGetRoute('products/(.*)/(.*)', function(){ $product = new Product(get_registry()); $product->getProducts(); }) (..)
For this url I have to supply 2 arguments. How can I make it work without them?