PHP code example of darkperis / dpadn-laravel

1. Go to this page and download the library: Download darkperis/dpadn-laravel 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/ */

    

darkperis / dpadn-laravel example snippets


Route::get('/', function() {
    return view('frontpage');
})->middleware('cache.headers:public;max_age=2628000;etag');




namespace App\Http\Controllers;

use ADNCache;

class BlogController extends BaseController
{
    // Your article logic here

    ADNCache::purge('/');
}

ADNCache::purge('*');
// or
ADNCache::purgeAll();

ADNCache::purge('/blog,/about-us,/');
// or
ADNCache::purgeItems(['/blog', '/about-us', '/']);

php artisan vendor:publish --provider="Darkpony\ADNCache\ADNCacheServiceProvider"