PHPackages                             haveyb/laravel-redis-helper - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. haveyb/laravel-redis-helper

ActiveLibrary

haveyb/laravel-redis-helper
===========================

This is a composer package to assist using redis in the laravel framework

v1.0(6y ago)030MITPHPPHP &gt;=7.1

Since Mar 10Pushed 6y ago1 watchersCompare

[ Source](https://github.com/haveyb/laravel-redis-helper)[ Packagist](https://packagist.org/packages/haveyb/laravel-redis-helper)[ RSS](/packages/haveyb-laravel-redis-helper/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependenciesVersions (2)Used By (0)

Laravel 框架使用 Redis 辅助文件

 由于Laravel 中使用 redis 采用的是门面模式，并且引用的是phpredis，在Laravel 框架中并没有redis的相关方法，这样就导致对于 Redis 操作不熟悉的人，可能就不知道都有什么命令，该如何操作了。

 该composer包 基于此开发，对redis的所有方法进行了分类封装和解释，使得不熟悉redis的开发者也能很轻松的使用，同样也可以看源码中对每个redis命令的解释，加深对redis命令的掌握。

以下是几个使用示例：

```
RedisHelper::set('zz', 'hello world');

```

```
RedisHelper::get('age');

```

```
RedisHelper::mget(['age', 'username', 'sex'])

```

```
RedisHelper::sInterStore(['aa', 'bb'])

```

下面是部分源代码

```
/**
     * 删除指定的键
     *
     * @param $param string|array
     * @return int 被删除的键的数目（有不存在的键，不影响其他存在的键的删除）
     * RedisHelper::del('age')
     * RedisHelper::del(['city', 'username', 'sex'])
     */
    public static function del($param)
    {
        return Redis::del($param);
    }

    /**
     * 如果键不存在，就设置键值（如果键已经存在了，则不再设置，返回false）
     *
     * @param $key
     * @param $value
     * @return  bool
     */
    public static function setNx($key, $value)
    {
        return Redis::setnx($key, $value);
    }

```

@website cyf

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

2255d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/5e26307248e2784b57bfbc13f74768e7799f5fb30c209b4aa33e49b7a921e7b4?d=identicon)[haveyb](/maintainers/haveyb)

---

Top Contributors

[![haveyb](https://avatars.githubusercontent.com/u/56058144?v=4)](https://github.com/haveyb "haveyb (4 commits)")

### Embed Badge

![Health badge](/badges/haveyb-laravel-redis-helper/health.svg)

```
[![Health](https://phpackages.com/badges/haveyb-laravel-redis-helper/health.svg)](https://phpackages.com/packages/haveyb-laravel-redis-helper)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
