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(6mo ago)08MITPHPPHP &gt;=8.1

Since Dec 7Pushed 6mo 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 today

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

32

—

LowBetter than 69% of packages

Maintenance65

Regular maintenance activity

Popularity4

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity46

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

209d 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

[renatomarinho/laravel-page-speed

Laravel Page Speed

2.5k1.7M11](/packages/renatomarinho-laravel-page-speed)[psalm/plugin-laravel

Psalm plugin for Laravel

3355.3M346](/packages/psalm-plugin-laravel)[vinkius-labs/laravel-page-speed

Laravel Page Speed

2.5k12.5k1](/packages/vinkius-labs-laravel-page-speed)[emargareten/inertia-modal

Inertia Modal is a Laravel package that lets you implement backend-driven modal dialogs for Inertia apps.

90142.9k](/packages/emargareten-inertia-modal)[wearepixel/laravel-cart

A cart implementation for Laravel

1374.8k](/packages/wearepixel-laravel-cart)[tomshaw/electricgrid

A feature-rich Livewire package designed for projects that require dynamic, interactive data tables.

119.4k](/packages/tomshaw-electricgrid)

PHPackages © 2026

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