PHP code example of madewithlove / illuminate-psr-cache-bridge

1. Go to this page and download the library: Download madewithlove/illuminate-psr-cache-bridge 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/ */

    

madewithlove / illuminate-psr-cache-bridge example snippets


use Illuminate\Contracts\Cache\Repository;
use Madewithlove\IlluminatePsrCacheBridge\Laravel\CacheItemPool;
use Psr\Cache\CacheItemPoolInterface;

$this->app->singleton(CacheItemPoolInterface::class, function ($app) {
    $repository = $app->make(Repository::class);

    return new CacheItemPool($repository);
});