PHP code example of swisnl / laravel-static-request-cache

1. Go to this page and download the library: Download swisnl/laravel-static-request-cache 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/ */

    

swisnl / laravel-static-request-cache example snippets


protected $middleware = [
    \Swis\Laravel\StaticRequestCache\Http\Middleware\CacheMiddleware::class,
];

public function __construct(StaticRequestCache $staticRequestCache)
{
    $this->staticRequestCache = $staticRequestCache;
    $this->staticRequestCache->disable();
}

StaticRequestCache::disable();
 bash
$ php artisan static-html-cache:clear