1. Go to this page and download the library: Download asika/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/ */
asika / minify example snippets
use Asika\Minifier\MinifierFactory;
$cssMinify = MinifierFactory::create('css');
$jsMinify = MinifierFactory::create('js');
$minify = new \Asika\Minifier\JsMinifier;
// OR
$minify = new \Asika\Minifier\CssMinifier;
use Asika\Minifier\MinifierFactory;
$minify = MinifierFactory::create($type);
$minify->addFile($path); // Add file path
$minify->addContent($path); // Add text content
// Get minify content
$minify->minify();
// To file
$minify->toFile($minifyFile);