PHP code example of nickdekruijk / minify

1. Go to this page and download the library: Download nickdekruijk/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/ */

    

nickdekruijk / minify example snippets


// config/minify.php
'builds' => [
    ['stylesheet' => ['reset.css', 'app.scss']],
    ['javascript' => ['app.js']],
],
 artisan vendor:publish --provider="NickDeKruijk\Minify\ServiceProvider" --tag=config

$tag = Minify::stylesheet(['lightbox.css', 'fonts.css', 'styles.css']);

php artisan minify:build
blade
@minifyJavascript(['scripts.js'], null, ['defer' => true])
@minifyStylesheet(['print.scss'], null, ['media' => 'print'])