PHP code example of blood72 / blade-minify
1. Go to this page and download the library: Download blood72/blade-minify 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/ */
blood72 / blade-minify example snippets
use Blood72\Minify\Blade as BladeMinifier;
$minified = BladeMinifier::minify('<HTML string>');
use Blood72\Minify\Blade as BladeMinifier;
use JSMin\JSMin as JSMinifier;
use Minify_CSSmin as CSSMinifier;
$minified = BladeMinifier::minify('<HTML string>', [
'cssMinifier' => [CSSMinifier::class, 'minify'],
'jsMinifier' => [JSMinifier::class, 'minify'],
]);