简体   繁体   中英

Redis scan family commands via laravel?

I am new to using Laravel and Redis together. I'm trying to run the Redis command zscan :

$redis = Redis::connection();
$redis->zscan('zset', 0, 'mor*'));

but when I do, I get the message:

'zscan' is not a registered Redis command

Does anyone have any idea why?

Laravel 4 uses the Predis Redis driver (look at the composer.json file to check that). The Zscan command was added to Predis 0.8.5.

Use

composer show -i

To check the installed version, and ensure the Predis installed version is at least 0.8.5.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM