madewithlove/illuminate-psr-cache-bridge 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

madewithlove/illuminate-psr-cache-bridge

最新稳定版本:1.0.3

Composer 安装命令:

composer require madewithlove/illuminate-psr-cache-bridge

包简介

README 文档

README

Latest Version on Packagist Software License Build Status Code Coverage Quality Score

This package adds PSR-6 cache support to Laravel 5. Laravel 6 has PSR-6 support build in which can be used through the cache.psr6 container alias.

Usage

To start using a Psr\Cache\CacheItemPoolInterface typed implementation that stores data in Laravel's configured cache, add this to a service provider:

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);
});

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

Install

In order to install it via composer you should run this command:

composer require madewithlove/illuminate-psr-cache-bridge

Testing

vendor/bin/phpunit

# or:
vendor/bin/phpunit --testsuite=integration-tests
vendor/bin/phpunit --testsuite=unit-tests

Credits

All Contributors

License

The MIT License (MIT). Please see License File for more information.

统计信息

  • 总下载量: 1.44M
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 86
  • 点击次数: 1
  • 依赖项目数: 13
  • 推荐数: 3

GitHub 信息

  • Stars: 85
  • Watchers: 12
  • Forks: 8
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2016-06-04