PHP code example of optimistdigital / laravel-set-cache-headers
1. Go to this page and download the library: Download optimistdigital/laravel-set-cache-headers 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/ */
optimistdigital / laravel-set-cache-headers example snippets
protected $routeMiddleware = [
// ...
'cache.headers' => \Illuminate\Http\Middleware\SetCacheHeaders::class,
// ...
];
protected $routeMiddleware = [
// ...
'cache.headers' => \OptimistDigital\SetCacheHeaders\Http\Middleware\SetCacheHeaders::class,
// ...
];