Hi I am using Laravel with Redis .When I am trying to access a key by get method then get following error "WRONGTYPE Operation against a key holding the wrong kind of value"
I am using following code to access the key value -
Route::get('/', function () {
//$redis = app()->make("redis");
$redis = Redis::connection();
return $redis->get("doctor:8a772886-e7b2-442a-a0d5-621307510c6a");
});
Could you please try this code sample and see if it works for you.
return $redis->HGETALL("doctor:8a772886-e7b2-442a-a0d5-621307510c6a");
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With