我收到错误消息“找不到类'Predis \ Client'"在Laravel 5.2中 [英] I'm getting error "Class 'Predis\Client' not found" in Laravel 5.2
本文介绍了我收到错误消息“找不到类'Predis \ Client'"在Laravel 5.2中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想在laravel 5.2中使用Redis,但是却出现错误,例如找不到"Predis \ Client"类,我该如何解决.
I want to using Redis in laravel 5.2 however, I'm getting error such a Class 'Predis\Client' 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
转到您的项目目录并安装作曲家:
Go to your project directory and install composer:
composer require 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
发送.
这篇关于我收到错误消息“找不到类'Predis \ Client'"在Laravel 5.2中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文