Download the PHP package shemshad/laravel-blade-minify-plus without Composer
On this page you can find all versions of the php package shemshad/laravel-blade-minify-plus. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package laravel-blade-minify-plus
Laravel Blade Minify Plus
laravel-blade-minify-plus is a lightweight package that minifies the final HTML output of Blade views.
It is designed to be easy for beginners and stable for production projects.
Why use this package?
- Reduces HTML size by removing unnecessary whitespace/comments.
- Keeps Blade templates unchanged (works at the response layer).
- Safe defaults that avoid aggressive transformations.
- Supports Laravel 8, 9, 10, 11, 12, and 13.
Requirements
- PHP 8.1+
- Laravel 8.x – 13.x
Installation
Laravel auto-discovers the service provider. If auto-discovery is disabled, register it manually:
Quick Start (2 minutes)
-
Publish config:
-
Add middleware to route(s):
- Open your page and inspect the response HTML.
Laravel version setup
Laravel 11, 12, and 13 (bootstrap/app.php)
Use middleware aliases in bootstrap/app.php:
A full example is available in:
examples/bootstrap.app.l12.phpexamples/bootstrap.app.l13.php
Laravel 10 and earlier (Kernel)
Register middleware alias in app/Http/Kernel.php:
For older app skeletons, use $routeMiddleware instead of $middlewareAliases.
Configuration
After publishing, edit config/blade-minify-plus.php.
Main options
enabled(bool): Global on/off switch.skip_routes(array): Route names that should not be minified.options(array): Low-levelvoku/html-minflags.
Example
How compatibility is preserved across Laravel versions
This package keeps compatibility by:
- Registering only a middleware alias in the service provider.
- Avoiding hard coupling to app-kernel internals.
- Minifying only eligible HTML responses.
- Skipping streamed/file responses and non-HTML content types.
This means Laravel 13 support is added without breaking Laravel 8-12 behavior.
Tips for beginners
- Start with route-level middleware first (
->middleware('minify')). - Test a few pages before enabling globally.
- Keep advanced
optionsat defaults unless you need deeper optimization. - If a page behaves unexpectedly, add its route name to
skip_routes.
Development checks
License
MIT
All versions of laravel-blade-minify-plus with dependencies
illuminate/support Version ^8.0|^9.0|^10.0|^11.0|^12.0|^13.0
voku/html-min Version ^4.5