PHP code example of rafalmasiarek / dashboard-kit-addon-compress
1. Go to this page and download the library: Download rafalmasiarek/dashboard-kit-addon-compress 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/ */
rafalmasiarek / dashboard-kit-addon-compress example snippets
$dashboard = Dashboard::create(__DIR__ . '/../', [
// ...
'compress' => [
'enabled' => true,
'exclude' => ['/api/'],
],
]);
CompressAddon::register($dashboard->getApp(), $dashboard->getContainer());
'exclude' => [
'/api/', // prefix match — any path starting with /api/
'~^/debug/~', // regex match — strings starting with ~ are treated as regexes
],