I just want to make a crud api over an "Event" object. Routes for index works well but the route for an specific event doesn't work as expected
this is what I have in 'routes.php'
$app->get('/event/:id', \App\Handler\EventRecoverHandler::class, 'event.withId');
I expect to recover the id in the handler using: $id = $request->getAttribute('id');
but the route only get recognized if I put '/events/:id' literally, in this case the handler is reached but the id is null (as expected)
on the other hand if I put '/events/4' the result is: "Cannot GET http://localhost/event/4"