SlimPHP Compression Middleware
Need to add gzip compression to your output but don't have access to the server configuration? This is a middleware for SlimPHP Framework to use HTTP+gzip compression.
Please note: If you CAN add this functionality to your server config, please do that instead.
Install the latest version with
$ composer require aaronsaray/slimphp-compression-middleware
$app = new \Slim\Slim(); $compressMiddleware = new \AaronSaray\SlimPHPMiddleware\Compress(); $app->add($compressMiddleware);