risenohk / laravel-minify-response by ryanchan.tc

Minify html response
1,666
6
2
Package Data
Maintainer Username: ryanchan.tc
Maintainer Contact: rc@riseno.com (Ryan Chan)
Package Create Date: 2016-05-18
Package Last Update: 2016-10-20
Language: PHP
License: MIT
Last Refreshed: 2024-12-15 03:03:52
Package Statistics
Total Downloads: 1,666
Monthly Downloads: 1
Daily Downloads: 0
Total Stars: 6
Total Watchers: 2
Total Forks: 0
Total Open Issues: 0

Laravel Minify Response

Latest Stable Version Total Downloads License

Laravel minify response middleware that will filter all the spaces and make all the HTML tags in one line.

Installation

Require this package with composer using the following command:

composer require riseno/laravel-minify-response

After updating composer, add the middleware to the middlewareGroups array in app/http/Kernel.php .

protected $middlewareGroups = [
    'web' => [
        \App\Http\Middleware\EncryptCookies::class,
        \Illuminate\Cookie\Middleware\AddQueuedCookiesToResponse::class,
        \Illuminate\Session\Middleware\StartSession::class,
        \Illuminate\View\Middleware\ShareErrorsFromSession::class,
        \App\Http\Middleware\VerifyCsrfToken::class,
        \Riseno\MinifyResponse\MinifyResponseMiddleware::class,
    ],
    ...
];

License

The Laravel minify response middleware is open-sourced software licensed under the MIT license