That’s because Slim-Psr7 does not implement that method anymore. You’ll need to use the Slim-Http decorators on top of Slim-Psr7.
Also, don’t use $app
to add routes within a group. You need to use the RouteCollectorProxy
like so:
$app->group(function (RouteCollectorProxy $group) {
$group->get(...);
});