Skip to content

Commit 82a8cd0

Browse files
Added documentation
1 parent 3bb1215 commit 82a8cd0

File tree

1 file changed

+51
-0
lines changed

1 file changed

+51
-0
lines changed

README.md

+51
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# Export interface with a CSV implementation
2+
3+
[![Latest Version on Packagist](https://img.shields.io/packagist/v/madewithlove/illuminate-psr-cache-bridge.svg?style=flat-square)](https://packagist.org/packages/madewithlove/illuminate-psr-cache-bridge)
4+
[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](LICENSE.md)
5+
[![Build Status](https://img.shields.io/travis/madewithlove/illuminate-psr-cache-bridge/master.svg?style=flat-square)](https://travis-ci.org/madewithlove/illuminate-psr-cache-bridge)
6+
[![Code Coverage](https://img.shields.io/scrutinizer/coverage/g/madewithlove/illuminate-psr-cache-bridge.svg?style=flat-square)](https://scrutinizer-ci.com/g/madewithlove/illuminate-psr-cache-bridge)
7+
[![Quality Score](https://img.shields.io/scrutinizer/g/madewithlove/illuminate-psr-cache-bridge.svg?style=flat-square)](https://scrutinizer-ci.com/g/madewithlove/illuminate-psr-cache-bridge)
8+
9+
## Usage
10+
11+
To start using a `Psr\Cache\CacheItemPoolInterface` typed implementation that stores data in Laravel's configured cache, add this to a service provider:
12+
13+
```
14+
use Illuminate\Contracts\Cache\Repository;
15+
use Madewithlove\IlluminatePsrCacheBridge\Laravel\CacheItemPool;
16+
use Psr\Cache\CacheItemPoolInterface;
17+
18+
$this->app->share(CacheItemPoolInterface::class, function () {
19+
$repository = $this->app->make(Repository::class);
20+
21+
return new CacheItemPool($repository);
22+
});
23+
```
24+
25+
Right now you're all set to start injecting `CacheItemPoolInterface`'d everywhere you need it.
26+
27+
## Install
28+
29+
In order to install it via composer you should run this command:
30+
31+
```bash
32+
composer require madewithlove/illuminate-psr-cache-bridge
33+
```
34+
35+
## Testing
36+
37+
``` bash
38+
vendor/bin/phpunit
39+
40+
# or:
41+
vendor/bin/phpunit --testsuite=integration-tests
42+
vendor/bin/phpunit --testsuite=unit-tests
43+
```
44+
45+
## Credits
46+
47+
[All Contributors](https://github.com/madewithlove/illuminate-psr-cache-bridge/contributors)
48+
49+
## License
50+
51+
The MIT License (MIT). Please see [License File](LICENSE) for more information.

0 commit comments

Comments
 (0)