Laravel minify response middleware that will filter all the spaces and make all the HTML tags in one line.
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,
],
...
];
The Laravel minify response middleware is open-sourced software licensed under the MIT license