gioco-plus/prism-plus

dev-master 2021-11-11 09:55 UTC

This package is auto-updated.

Last update: 2021-11-11 10:16:17 UTC


README

安裝

composer require "gioco-plus/prism-plus"

php bin/hyperf.php vendor:publish "gioco-plus/prism-const"

偏好設定

php bin/hyperf.php vendor:publish "gioco-plus/prism-plus"

快取

# 依赖注入

/**
 * 快取
 * @Inject()
 * @var CacheService
 */
protected $cache;

/**
 * 清除快取
 * @Inject()
 * @var CacheFlushService
 */
protected $cacheFlush;
# 配置MongoDb連線

/**
 * @Inject()
 * @var DbManager
 */
protected $dbManger;

# 使用
$this->dbManger->opMongoDb('gf')->insert("hyperf_test", [
    'aaa'=>'a',
    'bbb'=>'b',
    'ccc'=>'c'
]);

# 獲取Config
$this->config->get("mongodb.{$confName}");

2021