PHP code example of deniztezcan / laravel-responsecache-additions

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

    

deniztezcan / laravel-responsecache-additions example snippets


'hasher' => \Spatie\ResponseCache\Hasher\DefaultHasher::class,

'hasher' => \DenizTezcan\ResponseCache\Hasher\MobileHasher::class,

'replacers' => [
    \Spatie\ResponseCache\Replacers\CsrfTokenReplacer::class,
],

'replacers' => [
    \Spatie\ResponseCache\Replacers\CsrfTokenReplacer::class,
    \App\Replacers\FooReplacer::class,
],



namespace App\Replacers;

use DenizTezcan\ResponseCache\Replacers\BladeFilesReplacer;

class FooReplacer extends BladeFilesReplacer
{
	protected string | array $htmlTag = 'fake-html-tag'; // html tag without the <> in string or array format
    protected string | array $realTimeView = 'partials.fake-blade-loc'; // blade path string or array format
}
bash
php artisan vendor:publish --provider="Spatie\ResponseCache\ResponseCacheServiceProvider"