Skip to content

Commit

Permalink
Merge pull request #13 from GrahamCampbell/patch-1
Browse files Browse the repository at this point in the history
Fixed readme
  • Loading branch information
hannesvdvreken authored Jun 19, 2017
2 parents 88c0fa9 + 614b199 commit 56b0e3c
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,11 @@ use Illuminate\Contracts\Cache\Repository;
use Madewithlove\IlluminatePsrCacheBridge\Laravel\CacheItemPool;
use Psr\Cache\CacheItemPoolInterface;

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

return new CacheItemPool($repository);
});

// Depending on the version of Laravel you'll need to use this method instead:
$this->app->singleton(...);
```

Right now you're all set to start injecting `CacheItemPoolInterface`'d everywhere you need it.
Expand Down

0 comments on commit 56b0e3c

Please sign in to comment.