How to use PSR-7 middlewares with Slim

i add one line as above and trailingSlash() work without problem.
show your code example.

edit: which Slim version you use?