routes icon indicating copy to clipboard operation
routes copied to clipboard

Make more (all?) AltoRouter options available

Open mgussekloo opened this issue 7 years ago • 2 comments

AltoRouter already provides optional parameters, but Timber doesn't support them because this router strips question marks. I would like to use optional parameters, and maybe it wouldn't be a bad idea to just provide access to the AltoRouter object?

Something like

Routes::getRouter()->addRoutes([ ['GET','/users/[i:id?]', function($params) { etc... })

mgussekloo avatar Jan 02 '18 10:01 mgussekloo

Also, line 103 ($fullPath = is_readable($template);) returns true for files that exist, but may not be inside the theme directory... Maybe I can make a pull request to improve these two points?

mgussekloo avatar Jan 02 '18 11:01 mgussekloo

I was also searching for optinal parameters for my route. It would be really great i we could get this to work...Have you found any solution yet?

jasperrooduijn avatar Jan 15 '18 14:01 jasperrooduijn