reinvanoyen / middlewares-minifier
Installs: 6
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/reinvanoyen/middlewares-minifier
Requires
- wyrihaximus/html-compress: 1.4.x-dev
This package is auto-updated.
Last update: 2025-10-05 07:45:53 UTC
README
Install
composer require reinvanoyen/middlewares-minifier
Oak-framework specific installation
This package provides a Service Provider specifically for the Oak framework. This does NOT mean you can't use it with any other framework. As long as the framework respects PSR-15, this package can be used.
1) Register the Service provider
<?php $app->register([ \ReinVanOyen\Middlewares\HtmlMinifier\HtmlMinifierServiceProvider::class, ]);
2) Register the middleware
<?php $router->middleware('default', [ \ReinVanOyen\Middlewares\HtmlMinifier\HtmlMinifierMiddleware::class, ]);
3) Bind the middleware group to a route
<?php $router->get('(?<slug>.*)', PagesController::class, 'view') ->middleware(['default',]) ;