PHP code example of divtag / laravel-etag

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

    

divtag / laravel-etag example snippets

 php
Route::get('/', function () {
    return view('welcome');
})->middleware('etag');
 php
Route::get('/', function () {
    return response('foobar')
        ->header('ETag', 'W/"foobar"');
})->middleware('etag');