PHPackages                             jamesgordo/laravel-minify-html - 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. jamesgordo/laravel-minify-html

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

jamesgordo/laravel-minify-html
==============================

A minimal Laravel package that minifies the HTML output of all your Laravel web routes for production and staging environment.

143PHP

Since Feb 28Pushed 5y ago2 watchersCompare

[ Source](https://github.com/jamesgordo/laravel-minify-html)[ Packagist](https://packagist.org/packages/jamesgordo/laravel-minify-html)[ RSS](/packages/jamesgordo-laravel-minify-html/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Laravel Minify HTML
===================

[](#laravel-minify-html)

A minimal Laravel package that minifies the HTML output of all your Laravel web routes for production and staging environment.

Usage
-----

[](#usage)

Install the package by running this composer command.

```
composer require jamesgordo/laravel-minify-html
```

Add the package middleware to **$middlewareGroups\['web'\]** array of the `app/Http/Kernel.php` file

```
    /**
     * The application's route middleware groups.
     *
     * @var array
     */
    protected $middlewareGroups = [
        'web' => [
            \App\Http\Middleware\EncryptCookies::class,
            \Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class,
            \Illuminate\Session\Middleware\StartSession::class,
            // \Illuminate\Session\Middleware\AuthenticateSession::class,
            \Illuminate\View\Middleware\ShareErrorsFromSession::class,
            \App\Http\Middleware\VerifyCsrfToken::class,
            \Illuminate\Routing\Middleware\SubstituteBindings::class,

            // ADD THIS LINE
            \JamesGordo\LaravelMinifyHtml\Http\Middleware\MinifyHtml::class,
        ],
```

###  Health Score

18

—

LowBetter than 8% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity30

Early-stage or recently created project

 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/34288bc470eea6fd363b763e3fbf23363baa558215228e78e5d616e29504b7c7?d=identicon)[jamesgordo](/maintainers/jamesgordo)

---

Top Contributors

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

### Embed Badge

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

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

###  Alternatives

[prism-php/relay

A Prism tool for interacting with MCP servers

15236.1k3](/packages/prism-php-relay)[ruafozy/mersenne-twister

Pure-PHP Mersenne Twister

221.4M12](/packages/ruafozy-mersenne-twister)[writecrow/lemmatizer

A non-part-of-speech lemmatizer tool

13183.1k2](/packages/writecrow-lemmatizer)

PHPackages © 2026

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