Inject PSR-7 object decorators to route in Slim 4

Hi, odan.

I’m curious how to inject PSR-7 object decorators to route in Slim 4

$app->get('/', function ($request, $response) {
  ## $request << decorated request
  ## $response << decorate response
});

So, when I use controller as callable

public funcion index($request, $response)
{
  ## $request << decorated request
  ## $response << decorate response
}

thanks

You basically just install it via composer and then follow the steps in the README.

Slim will then pass the decorated objects into your route handlers.