PHP code example of wyrihaximus / minify-html
1. Go to this page and download the library: Download wyrihaximus/minify-html 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/ */
wyrihaximus / minify-html example snippets
// In src/Application.php
use Cake\Http\BaseApplication;
use WyriHaximus\MinifyHtml\Plugin as MinifyHtmlPlugin;
class Application extends BaseApplication {
public function bootstrap()
{
parent::bootstrap();
// Load the minify html plugin by class name
$this->addPlugin(MinifyHtmlPlugin::class);
}
}
class AppView extends View
{
public function initialize(): void
{
$this->loadHelper('WyriHaximus/MinifyHtml.MinifyHtml');
}
}
'\WyriHaximus\MinifyHtml\compress'