cuatao / laravel-html-caching
There is no license information available for the latest version (dev-master) of this package.
dev-master
2017-10-19 07:14 UTC
This package is auto-updated.
Last update: 2025-03-29 00:31:11 UTC
README
composer require cuatao/laravel-html-caching
Publish the package config file
php artisan vendor:publish
Register as route middleware
// within app/Http/Kernel.php protected $routeMiddleware = [ // \Cuatao\LaravelHtmlCaching\Http\Middleware\ResponseHtmlCachingBeforeMiddleware::class, \Cuatao\LaravelHtmlCaching\Http\Middleware\ResponseHtmlCachingAfterMiddleware::class, // ];
Apply HTML response cache to routes
// within routes/web.php Route::get('/', function () { return view('welcome'); })->middleware('web');