我收到错误“找不到类‘PredisClient’"在 Laravel 5.2 中 [英] I'm getting error "Class 'PredisClient' not found" in Laravel 5.2
本文介绍了我收到错误“找不到类‘PredisClient’"在 Laravel 5.2 中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想在 laravel 5.2 中使用 Redis,但是我遇到了错误,比如找不到 Class 'PredisClient',我该如何解决.
I want to using Redis in laravel 5.2 however, I'm getting error such a Class 'PredisClient' not found, How I can solve it.
推荐答案
- 首先将 REDIS 下载到您的系统(如果您尚未安装).
进入你下载redis的文件夹并运行以下命令:
- First download the REDIS to your system (if you haven't already installed it).
Go to the folder where you have downloaded the redis and run this command:
cd your-redis-folder-name
make
进入你的项目目录并安装composer:
Go to your project directory and install composer:
composer 需要 predis/predis
转到您的 .env 文件并添加队列驱动程序:
Go to your .env file and add Queue driver:
QUEUE_DRIVER=redis
Mail::queue()
通过队列发送邮件.请参阅 文档.然后在你的终端运行:
Mail::queue()
to send mail via queue. See Doc.And in your terminal run:
php artisan queue:listen
发送.
这篇关于我收到错误“找不到类‘PredisClient’"在 Laravel 5.2 中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文