laravel5.5 使用$redis->hgetall 命令报错,其他没有问题。
laravel5.5 使用$redis->hgetall 报这个错误,求大神解决。
Illuminate\Contracts\Encryption\DecryptException: The payload is invalid. in /opt/htdocs/crm-php-admin/vendor/laravel/framework/src/Illuminate/Encryption/Encrypter.php on line 191
2 Comments
使用其他命令没有,就是hgetall报错,求大神解决
use App\Models\ActLotteryModel;
use Illuminate\Support\Facades\Redis;
class yuController extends Controller
{
}
<?php
namespace App\Models;
use Illuminate\Support\Facades\Redis;
class ActLotteryModel {
public function getall() {
$redis = Redis::connection('default');
$redis->hset('ff', 'yutu', 1);
$redis->hset('ff', 'tom', 2);
$t = $redis->hgetall('ff');
}