HTMLMin / Laravel-HTMLMin

A simple HTML minifier for Laravel 5, 6, 7, 8 & 9.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Minification does not work :(

Ahtnezev opened this issue · comments

Laravel Framework 9.52.4
PHP 8.1.18
Composer version 2.3.7 2022-06-06
Livewire 2.x

Hi, I have a problem when viewing the minified blade files, I don't know if it's 'cause I'm using Livewire? thanks
already tried with view:clear command and config:clear and force => true

The same here. I've installed the package and follow every step and this package does totally NOTHING. Nothing like view:clear or set "force" to true doesn't help.

Laravel 9.52.15
PHP 8.1.23

The same here. I've installed the package and follow every step and this package does totally NOTHING. Nothing like view:clear or set "force" to true doesn't help.

Laravel 9.52.15 PHP 8.1.23

did you add the middleware to the routes? that actually does the HTML minification

Found it, you need to modify app/Http/Kernel.php file to make it work:

protected $middleware = [
    ...
    \HTMLMin\HTMLMin\Http\Middleware\MinifyMiddleware::class
];

Documentation: https://laravel.com/docs/10.x/middleware
Can someone update the documentation?