PHP code example of megaads / interceptor

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

    

megaads / interceptor example snippets


'providers' => [
    // ...
    Megaads\Interceptor\InterceptorServiceProvider::class,
],

Route::group(['middleware' => 'interceptor'], function () {
    Route::get('/', 'HomeController@index');
    Route::get('/category/{slug}', 'CategoryController@show');
});
bash
php artisan vendor:publish --provider="Megaads\Interceptor\InterceptorServiceProvider"
bash
  php artisan interceptor:flush
  
bash
  # Check total cache count
  php artisan interceptor:monitor sum

  # List cache keys (optional device filter)
  php artisan interceptor:monitor list
  php artisan interceptor:monitor list mobile

  # Check specific URL keys
  php artisan interceptor:monitor check "https://example.com/foo"
  
bash
  php artisan interceptor:garbage