Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Yii2 Redis Laravel Package

yiisoft/yii2-redis

Yii2 Redis extension providing Redis connection plus Cache, Session, and Mutex handlers, and an ActiveRecord layer to store and query structured data in Redis using familiar Yii2 patterns. Requires Redis 2.6.12+ and PHP 7.4+ (best on PHP 8).

View on GitHub
Deep Wiki
Context7

直接使用命令行

Redis 有很多可以直接从连接中使用的有用的命令。在配置应用程序后, 如 安装 所示,连接可以像下面这样获取:

$redis = Yii::$app->redis;

完成之后可以执行如下命令。最通用的方法是使用 executeCommand 方法:

$result = $redis->executeCommand('hmset', ['test_collection', 'key1', 'val1', 'key2', 'val2']);

每个命令都有相应的快捷方式支持,所以可以像下面这样代替以上的命令:

$result = $redis->hmset(['test_collection', 'key1', 'val1', 'key2', 'val2']);

可用命令列表和他们的参数可参阅 https://redis.io/commands

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
emuniq/filament-browser-notifications
syriable/filament-translator
hungnm28/livewire-form
wenprise/eloquent
crudly/encrypted
fadion/bouncy
cuci/prototurk-sdk
gos/pubsub-router-bundle
cuci/prototurk-sdk-symfony
clementtalleu/easyadmin-markdown-bundle
codeflextech/permission-manager
karnoweb/livewire-datepicker
sayedenam/sayed-dashboard
milito/query-filter
apiboxsym/user-bundle
apiboxsym/health-check-bundle
jayeshmepani/jpl-moshier-ephemeris-php
elnasnato/laraliveui
labrodev/rest-sdk
sampaui/sampaui