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

[rafaelfragoso/haversini-formula

This PHP class can replace the Google Distance Matrix to calculate the distance between two points using latitude and longitude. It will prevent you to do massive requests to Google servers and enhance your service performance.

45212.0k](/packages/rafaelfragoso-haversini-formula)

PHPackages © 2026

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