noodlehaus/dispatch

route to '/'

miramir opened this issue · 3 comments

I can not do route to addresses '/'

include __DIR__.'/vendor/dispatch/dispatch.php';
get('/', function(){
    render('index', null, false);
});
dispatch();

do not work for me.

Try it:

get('/index', function() .....

fanks, it works

hi guys, sorry for the lack of response on this. thanks for pointing out this issue. like what icebob said, in the meantime, use '/index'. i'm working on a fix on this. it's an issue with the way routes are trimmed and stored in the route-handler map. reopening this. thanks.