WokerTask/app/common/logic/RedisLogic.php

16 lines
355 B
PHP
Raw Normal View History

2023-12-27 14:06:33 +08:00
<?php
namespace app\common\logic;
class RedisLogic extends BaseLogic
{
public static function getInstance()
{
$redisInstance = new \Redis();
$redisInstance->connect(env('redis.host'));
if (env('redis.auth', '') != '') {
$redisInstance->auth(env('redis.auth'));
}
return $redisInstance;
}
}