New

Just launched: Vueblocks, a brand-new search engine for Vue packages! Explore Vueblocks →

tje3d/html-minify

Minifies the HTML output of Laravel 5 applications (Originally from https://github.com/fitztrev/laravel-html-minify)
88
Install
composer require tje3d/html-minify
Latest Version:1.0.1
PHP:>=5.6.0
Laravel:5
License:MIT
Last Updated:Apr 30, 2017
Links: GitHub  ·  Packagist
Maintainer: tje3d

Laravel 5 HTML Minify

This package is originally from https://github.com/fitztrev/laravel-html-minify i just updated the package and made it compatible with laravel 5, And i forked and make it simple 😁

About

This package compresses the HTML output from your Laravel 5 application, seamlessly reducing the overall response size of your pages.

Other scripts that I've seen will compress the HTML output on-the-fly for each request. Instead, this package extends the Blade compiler to save the compiled template files to disk in their compressed state, reducing the overhead for each request.

Why?

Even with gzip enabled, there is still an improvement in the response size for HTML content-type documents.

Test Page w/o Gzip w/ Gzip w/ Gzip + Laravel HTML Minify
#1 8,039 bytes 1,944 bytes 1,836 bytes (5.6% improvement)
#2 377,867 bytes 5,247 bytes 4,314 bytes (17.8% improvement)

Installation

  1. composer require tje3d/html-minify
  2. Add Tje3d\HtmlMinify\HtmlMinifyServiceProvider::class to the list of providers in config/app.php.
  3. Publish your config with php artisan vendor:publish command
  4. php artisan view:clear

Options

  • enabled - boolean, default true

Related Packages

yocmen/html-minify

Minifies the HTML output of Laravel 5 applications (Originally from https://gith...

13,735 16
fitztrev/laravel-html-minify

Minifies the HTML output of Laravel 4 applications

216,857 411
ken/blade-minify

Laravel Blade Minify

10,293 12
shemshad/laravel-blade-minify-plus

Minify final Laravel Blade HTML safely with first-class Laravel 8-13 support and...

5,173 1
yocmen/blade-components

This package introduces the concept of components in blade templating, take it f...

1,253 8

Version History

Version Released PHP Laravel License
1.0.1 >=5.6.0 5.x MIT