laravel中如何查询以某某开头的所有key

在laravel中如何查询以test开头的所有key

```
$uid_active = Redis::command('KEYS', ['test*']);
$cache_prefix = strtolower(config('app.name').'_database_');
foreach($uid_active as $key){
$active_time = Redis::command('get', [str_replace($cache_prefix,"",$key)]);
$uid = explode("::",$key)[2];
echo $uid;
echo $active_time;
}
```

    A+
发布日期:2022年10月25日  所属分类:未分类

发表评论

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: