PHPackages                             zakariatlilani/laravel-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. [Utility &amp; Helpers](/categories/utility)
4. /
5. zakariatlilani/laravel-minify

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

zakariatlilani/laravel-minify
=============================

laravel minify html output

1.2(5mo ago)08MITPHPPHP &gt;=8.1

Since Dec 7Pushed 5mo agoCompare

[ Source](https://github.com/ZakariaTlilani/laravel-minify)[ Packagist](https://packagist.org/packages/zakariatlilani/laravel-minify)[ Docs](https://github.com/zakariatlilani/laravel-minify)[ RSS](/packages/zakariatlilani-laravel-minify/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (3)Dependencies (2)Versions (4)Used By (0)

This package helps to minify your project`s html (blade file) output.

### Requirements

[](#requirements)

LaravelPackage&gt;= 10.x1.xInstallation
------------

[](#installation)

You can install the package via composer:

```
composer require zakariatlilani/laravel-minify
```

Setup
-----

[](#setup)

### Generate Config

[](#generate-config)

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

### add middleware to web middleware group within bootstrap/app.php

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

```
->withMiddleware(function (Middleware $middleware) {
    $middleware->web(append: [
        \zakariatlilani\LaravelMinify\Middleware\LaravelMinifyHtml::class
    ]);
})
```

Usage
-----

[](#usage)

### for enable/disable in .env

[](#for-enabledisable-in-env)

```
MINIFY_ACTIVATE=true
```

### to disable it locally in .env

[](#to-disable-it-locally-in-env)

```
MINIFY_ONLY_PRODUCTION=false
```

### exclude route name for from minify update config

[](#exclude-route-name-for-from-minify-update-config)

```
'exclude_route' => [
        // 'routeName'
]
```

### minify particular html part

[](#minify-particular-html-part)

```
LaravelMinifyFacade::htmlMinify("...");
```

### exclude minify particular html part

[](#exclude-minify-particular-html-part)

```
LaravelMinifyFacade::excludeHtmlMinify("...");
```

### exclude html minify in blade directory

[](#exclude-html-minify-in-blade-directory)

```
@excludeMinify
     exclude code from Minify
@endExcludeMinify
```

### Testing

[](#testing)

```
composer test
```

### Changelog

[](#changelog)

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

Contributing
------------

[](#contributing)

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

Credits
-------

[](#credits)

- [Zakaria Tlilani](https://github.com/zakariatlilani)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance72

Regular maintenance activity

Popularity4

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity45

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

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 ~0 days

Total

3

Last Release

157d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/4d4a410fb650e270485c131ed01ac8a6e84ff9ee030dbcc85e3ef6d148eca38b?d=identicon)[zakaria tlilani](/maintainers/zakaria%20tlilani)

---

Top Contributors

[![ZakariaTlilani](https://avatars.githubusercontent.com/u/116965173?v=4)](https://github.com/ZakariaTlilani "ZakariaTlilani (4 commits)")

---

Tags

laravelminifycompressZakariaTlilani

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/zakariatlilani-laravel-minify/health.svg)

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

###  Alternatives

[barryvdh/laravel-ide-helper

Laravel IDE Helper, generates correct PHPDocs for all Facade classes, to improve auto-completion.

14.9k123.0M687](/packages/barryvdh-laravel-ide-helper)[vinkius-labs/laravel-page-speed

Laravel Page Speed

2.5k5.4k1](/packages/vinkius-labs-laravel-page-speed)[goszowski/laravel-vendor-minify

A vendor minify package, to remove tests and documentation and minifing all php files to save space

803.6k](/packages/goszowski-laravel-vendor-minify)[interaction-design-foundation/laravel-geoip

Support for multiple Geographical Location services.

17221.0k3](/packages/interaction-design-foundation-laravel-geoip)[fisharebest/laravel-assets

Asset management for Laravel

208.1k](/packages/fisharebest-laravel-assets)

PHPackages © 2026

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