dipeshsukhia/laravel-html-minify
最新稳定版本:v3.3.5
Composer 安装命令:
composer require dipeshsukhia/laravel-html-minify
包简介
laravel minify html output
README 文档
README
This package helps to minify your project`s html (blade file) output.
Requirements
| Laravel | Package |
|---|---|
| 5.x to 9.x | 2.x |
| >= 10.x | 3.x |
Installation
You can install the package via composer:
composer require dipeshsukhia/laravel-html-minify
Sponsor Laravel HTML Minifier on GitHub
Become a sponsor to Dipesh Sukhia .
Setup
Generate Config
php artisan vendor:publish --tag=LaravelHtmlMinify
add middleware to web middleware group within app/Http/Kernel.php
\DipeshSukhia\LaravelHtmlMinify\Middleware\LaravelMinifyHtml::class
Usage
for enable in env
HTML_MINIFY=true
for disable in env
HTML_MINIFY=false
exclude route name for from minify update config
'exclude_route' => [ // 'routeName' ]
minify particular html part
LaravelHtmlMinifyFacade::htmlMinify("<div>...</div>");
exclude minify particular html part
LaravelHtmlMinifyFacade::excludeHtmlMinify("<div>...</div>");
exclude html minify in blade directory
@excludeMinify
<div> exclude code from Minify </div>
@endExcludeMinify
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.
统计信息
- 总下载量: 68.85k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 78
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2019-11-10