PHP code example of dipeshsukhia / laravel-html-minify
1. Go to this page and download the library: Download dipeshsukhia/laravel-html-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/ */
dipeshsukhia / laravel-html-minify example snippets
php
php artisan vendor:publish --tag=LaravelHtmlMinify
you should add middleware to your web middleware group within your app/Http/Kernel.php file:
use DipeshSukhia\LaravelHtmlMinify\Middleware\LaravelMinifyHtml;
LaravelMinifyHtml::class
add in env
for enable
HTML_MINIFY = true
for disable
HTML_MINIFY = false
exclude route name for exclude from minify
'exclude_route' => [
// 'routeName'
]
for particular html part
LaravelHtmlMinifyFacade::htmlMinify("<div>...</div>");