PHP code example of m1guelpf / laravel-etag

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

    

m1guelpf / laravel-etag example snippets


// app/Http/Kernel.php

...
protected $routeMiddleware = [
        ...
        'throttle' => \M1guelpf\Etag\EtagMiddleware::class,
    ];

// in a routes file
Route::get('my-page', 'MyController')->middleware('throttle');