1. composer search laravel  搜索版本

  2. composer create-project --prefer-dist laravel/laravel

  3. 进到框架的根目录下  composer require predis/predis(安装redis)

  4. 控制里面配置:


  5. use Illuminate\Support\Facades\Redis as Redis;
  6. $result=Redis::setex('dll2',10,serialize($data));
    unserialize(Redis::get('dll2'));