PHP code example of fuelviews / laravel-cloudflare-cache
1. Go to this page and download the library: Download fuelviews/laravel-cloudflare-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/ */
fuelviews / laravel-cloudflare-cache example snippets
return [
/**
* Generate zone or global api key.
*
* @see https://dash.cloudflare.com/profile/api-tokens
*/
'api_key' => env('CLOUDFLARE_CACHE_API_KEY'),
/**
* The zone_id of your site on cloudflare dashboard.
*/
'identifier' => env('CLOUDFLARE_CACHE_ZONE_ID'),
/**
* Debug mode.
*/
'debug' => env('CLOUDFLARE_CACHE_DEBUG', false),
];
use Fuelviews\CloudflareCache\Facades\CloudflareCache;
CloudflareCache::purgeEverything();