PHP code example of abordage / laravel-html-min
1. Go to this page and download the library: Download abordage/laravel-html-min 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/ */
abordage / laravel-html-min example snippets
// app/Http/Kernel.php
protected $middleware = [
'web' => [
// other middleware
\Abordage\LaravelHtmlMin\Middleware\HtmlMinify::class,
],
// ...
];
return [
/*
|--------------------------------------------------------------------------
| Enable Html Min
|--------------------------------------------------------------------------
*/
'enable' => env('HTML_MINIFY', true),
/*
|--------------------------------------------------------------------------
| Find DOCTYPE in document
|--------------------------------------------------------------------------
*/
'find_doctype_in_document' => true,
/*
|--------------------------------------------------------------------------
| Remove whitespace between tags
|--------------------------------------------------------------------------
*/
'remove_whitespace_between_tags' => true,
/*
|--------------------------------------------------------------------------
| Remove blank lines in script elements
|--------------------------------------------------------------------------
*/
'remove_blank_lines_in_script_elements' => false,
];
bash
php artisan vendor:publish --tag="html-min-config"