bakerysoft / laravel-html-minify
laravel minify html output
dev-master
2025-02-23 15:10 UTC
Requires
- php: ^8.2
- illuminate/support: ^11.0
Requires (Dev)
- orchestra/testbench: 8.0.*
- phpunit/phpunit: ^10.1
This package is auto-updated.
Last update: 2025-04-23 15:28:58 UTC
README
This package helps to minify your project`s html (blade file) output.
Requirements
Laravel | Package |
---|---|
5.x to 9.x | 2.x |
10.0 to 11.x | 3.x |
Installation
You can install the package via composer:
composer require bakerysoft/laravel-html-minify
Sponsor Laravel HTML Minifier on GitHub
Become a sponsor to Dipesh Sukhia .
Usage
php artisan vendor:publish --tag=LaravelHtmlMinify you should add middleware to your web middleware group within your app/Http/Kernel.php file: use bakerysoft\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>");
Testing
composer test
Changelog
Please see CHANGELOG for more information what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security
If you discover any security related issues, please email dipesh.sukhia@gmail.com instead of using the issue tracker.
Credits
License
The MIT License (MIT). Please see License File for more information.