douban2014 2016-06-16 19:58
浏览 426

在laravel 5.2中找不到类'lluminate \ Redis \ RedisServiceProvider'

I am trying to use predis in laravel 5.2.I have installed predis and redis via composer.json in require as predis" :"~1.0".Then I did composer update and also ran composer require illuminate/redis to pull redis files.

but when i am using in my controller(showing only related code)

//Code
use Redis;
function index(){
      Redis::set("masterpowers", "Yeah Baby Yeah");
      print_r(Redis::get("masterpowers"));
}
//Code ends

Its showing error in localhost as well as in terminal-

FatalErrorException in ProviderRepository.php line 146: Class 'lluminate\Redis\RedisServiceProvider' not found

I have installed redis client too and my command redis-cli ping working fine.

  • 写回答

2条回答 默认 最新

  • duanbai1370 2016-06-16 20:18
    关注

    Make sure in your config/app.php file that Illuminate\Redis\RedisServiceProvider::class is listed under providers, then run terminal command composer dump-autoload (regardless if class is found or not).

    评论

报告相同问题?

悬赏问题

  • ¥15 slam rangenet++配置
  • ¥15 对于相关问题的求解与代码
  • ¥15 ubuntu子系统密码忘记
  • ¥15 信号傅里叶变换在matlab上遇到的小问题请求帮助
  • ¥15 保护模式-系统加载-段寄存器
  • ¥15 电脑桌面设定一个区域禁止鼠标操作
  • ¥15 求NPF226060磁芯的详细资料
  • ¥15 使用R语言marginaleffects包进行边际效应图绘制
  • ¥20 usb设备兼容性问题
  • ¥15 错误(10048): “调用exui内部功能”库命令的参数“参数4”不能接受空数据。怎么解决啊