PHPackages                             rzl-app/laravel-blade-minify - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Templating &amp; Views](/categories/templating)
4. /
5. rzl-app/laravel-blade-minify

ActiveLibrary[Templating &amp; Views](/categories/templating)

rzl-app/laravel-blade-minify
============================

A Laravel package to seamlessly minify Blade HTML output for faster pages and a better user experience.

v1.2.2(9mo ago)231↓100%MITPHPPHP ^8.2

Since Jul 6Pushed 9mo agoCompare

[ Source](https://github.com/rzl-app/laravel-blade-minify)[ Packagist](https://packagist.org/packages/rzl-app/laravel-blade-minify)[ Docs](https://github.com/rzl-app/laravel-blade-minify)[ GitHub Sponsors](https://github.com/rzl-app)[ RSS](/packages/rzl-app-laravel-blade-minify/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (3)Versions (8)Used By (0)

⚡️Rzl Laravel Blade Minifier 🚀
==============================

[](#️rzl-laravel-blade-minifier-)

[![Latest Version on Packagist](https://camo.githubusercontent.com/86047a924e33a3aab3f20ac53ee11c3fe047fa1a6684cfa698ca26639cfffcc3/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f727a6c2d6170702f6c61726176656c2d626c6164652d6d696e6966792e7376673f7374796c653d666c61742d726f756e646564)](https://packagist.org/packages/rzl-app/laravel-blade-minify)[![Total Downloads](https://camo.githubusercontent.com/cb99536cd8dbf569750282a3d7d1821a50a617c61ae13a23f19b453ffb6572b3/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f727a6c2d6170702f6c61726176656c2d626c6164652d6d696e6966792e7376673f7374796c653d666c61742d726f756e646564)](https://packagist.org/packages/rzl-app/laravel-blade-minify)[![PHPStan](https://camo.githubusercontent.com/1fb18cc8ee49b1c75bb0156d1646dbcefb6ab66871ff8f6783f386c0b816de07/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068707374616e2d6c6576656c253230382d627269676874677265656e3f7374796c653d666c61742d726f756e646564)](https://phpstan.org)[![PHP](https://camo.githubusercontent.com/b1a4bb15b7ef375e86b1f23cba08a0954fae3d71e6d81a5e0e5c2b4399191a43/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d253545382e322d626c75653f7374796c653d666c61742d726f756e646564)](https://www.php.net)[![Laravel](https://camo.githubusercontent.com/f0610ad00cf90ed8ca5e21a6dc065471a24a4749085c49ea067dc7fa9dfc6e31/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c61726176656c2d25354531302e7825323025374325323025354531312e7825323025374325323025354531322e782d7265643f7374796c653d666c61742d726f756e646564)](https://laravel.com)[![Illuminate Support](https://camo.githubusercontent.com/cfad382c1e1909bd8ce0f30099ba2b7bdd336d03afcbcb800c6b45111031e3d3/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f696c6c756d696e617465253246737570706f72742d25354531302e7825323025374325323025354531312e7825323025374325323025354531322e782d626c75653f7374796c653d666c61742d726f756e646564)](https://laravel.com/docs)

> 🚀 **Automatically minifies your Laravel Blade output for smaller pages &amp; blazing-fast load times.**
>
> 🛠 **Supports:**
>
> - 📚 [Laravel Docs](https://laravel.com/docs) — for official usage
> - 🧩 [`Illuminate\Support`](https://github.com/laravel/framework/tree/12.x/src/Illuminate/Support)
> - 🐘 PHP ^8.2 + Laravel ^10.x | ^11.x | ^12.x
>
> **Built with ❤️ by [@rzl-app](https://github.com/rzl-app).**

---

📚 Table of Contents
-------------------

[](#-table-of-contents)

- 🛠 [Requirements](#requirements)
- ⚙️ [Installation](#installation)
- 🚀 [Setup](#setup)
- 🔥 [Usage](#usage)
- 📝 [Changelog](#changelog)
- 🤝 [Contributing](#contributing)
- 🛡 [Security](#security)
- 🙌 [Credits](#credits)
- 📜 [License](#license)
- 🔗 [Framework &amp; Reference Links](#framework--reference-links)

---

🛠 Requirements
--------------

[](#-requirements)

Laravel Framework &amp; `illuminate/support`PHPPackage^10.x | ^11.x | ^12.x^8.2v1.x---

⚙️ Installation
---------------

[](#️-installation)

You can install the package via composer:

```
composer require rzl-app/laravel-blade-minify
```

Sponsor Rzl Laravel Blade Minifier on GitHub
--------------------------------------------

[](#sponsor-rzl-laravel-blade-minifier-on-github)

[Become a sponsor to Rzl App ](https://github.com/sponsors/rzl-app).

---

🚀 Setup
-------

[](#-setup)

### Publish config

[](#publish-config)

```
php artisan vendor:publish --tag=RzlLaravelBladeMinify
```

### Add middleware to web middleware group within app/Http/Kernel.php

[](#add-middleware-to-web-middleware-group-within-apphttpkernelphp)

```
\RzlApp\BladeMinify\Middleware\RzlBladeMinify::class
```

---

🔥 Usage
-------

[](#-usage)

### Enable in .env

[](#enable-in-env)

```
RZL_MINIFY_ENABLE=true
```

### Disable in .env

[](#disable-in-env)

```
RZL_MINIFY_ENABLE=false
```

### Minify only in production

[](#minify-only-in-production)

```
RZL_MINIFY_ONLY_PROD=true
```

### Minify at all mode APP Env (default)

[](#minify-at-all-mode-app-env-default)

```
RZL_MINIFY_ONLY_PROD=false
```

### Ignore specific route names from minifying render output

[](#ignore-specific-route-names-from-minifying-render-output)

```
'ignore_route_name' => [
  // 'dashboard',
  // 'home',
]
```

### Minify a particular Blade string manually

[](#minify-a-particular-blade-string-manually)

```
RzlBladeMinifyFacade::bladeMinify("...");
```

### Ignoring minify a particular Blade string manually

[](#ignoring-minify-a-particular-blade-string-manually)

```
RzlBladeMinifyFacade::excludeBladeMinify("...");
```

### Ignore minify in Blade

[](#ignore-minify-in-blade)

```
{{-- Blade directive to ignore minify --}}

@ignoreMinify
   this script will ignored from minify
@endIgnoreMinify
```

### Working with vite directive

[](#working-with-vite-directive)

At dev mode you can do:

```
{{-- Blade directive to ignore minify vite directive --}}

@ignoreMinify
  @viteReactRefresh
@endIgnoreMinify
```

Or add to your providers.php:

```
// bootstrap/providers.php

return [
  RzlApp\BladeMinify\Providers\ViteCustomProvider::class,
  // .... other you provider class...
];
```

---

📝 Changelog
-----------

[](#-changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.

---

🤝 Contributing
--------------

[](#-contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

---

🛡 Security
----------

[](#-security)

Please report issues to .

---

🙌 Credits
---------

[](#-credits)

- [Rzl App](https://github.com/rzl-app)
- [All Contributors](../../contributors)

---

📜 License
---------

[](#-license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

---

🔗 Framework &amp; Reference Links
---------------------------------

[](#-framework--reference-links)

ReferenceURL📝 Laravel Docs🏗 Illuminate\\Support🐘 PHP Official---

✅ **Enjoy `rzl-app/laravel-blade-minify`?**
Leave a ⭐ on GitHub — it keeps this project thriving!

---

✨ From [rzl-app](https://github.com/rzl-app) — *where code meets passion.*

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance56

Moderate activity, may be stable

Popularity11

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~3 days

Total

7

Last Release

293d ago

PHP version history (2 changes)v1.0.0PHP &gt;=8.1

v1.2.0PHP ^8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/d631f4e1637d8f1184390a2a5635d698e1229bb25bffb6eb6b4dab42912d59b3?d=identicon)[rzl-zone](/maintainers/rzl-zone)

---

Tags

laravelperformancehtmlminifybladeHTML minifyrzl-appblade-minifylaravel-minifylaravel-blade-minify

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/rzl-app-laravel-blade-minify/health.svg)

```
[![Health](https://phpackages.com/badges/rzl-app-laravel-blade-minify/health.svg)](https://phpackages.com/packages/rzl-app-laravel-blade-minify)
```

###  Alternatives

[fitztrev/laravel-html-minify

Minifies the HTML output of Laravel 4 applications

414211.4k](/packages/fitztrev-laravel-html-minify)[yocmen/html-minify

Minifies the HTML output of Laravel 5 applications (Originally from https://github.com/fitztrev/laravel-html-minify)

1713.7k](/packages/yocmen-html-minify)[ken/blade-minify

Laravel Blade Minify

128.9k1](/packages/ken-blade-minify)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
