PHP code example of mnshankar / laravel-cache-route
1. Go to this page and download the library: Download mnshankar/laravel-cache-route library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
mnshankar / laravel-cache-route example snippets
function __construct()
{
$this->middleware('cache.route');
}
Route::get('my/page', ['middleware' => 'cache-route', function()
{
//
}]);
Route::get('/', function () {
//
})->middleware(['cache-route']);
bash
'cache.route'=>'mnshankar\Cache\Middleware\CacheRoute',