PHP code example of green-turtle / content-encoding
1. Go to this page and download the library: Download green-turtle/content-encoding library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
green-turtle / content-encoding example snippets
'encode_unknown_type' => false,
'allowed_types' => [ '#^(text\/.*)(;.*)?$#' ]
'encoders' => [
Gzip::class,
Deflate::class,
]
protected $middleware = [
// other middleware...
\GreenTurtle\Middleware\ContentEncoding::class
// other middleware...
];
text
php artisan vendor:publish --tag="green-turtle-content-encoding"