且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

我收到错误消息“找不到类'Predis \ Client'"在Laravel 5.2中

更新时间:2023-11-17 08:19:04

  1. 首先将 REDIS 下载到您的系统(如果尚未安装).
  2. 转到已下载Redis的文件夹,然后运行以下命令:

  1. First download the REDIS to your system (if you haven't already installed it).
  2. 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()通过队列发送邮件.参见文档.
  • 然后在您的终端中运行:

  • use Mail::queue() to send mail via queue. See Doc.
  • And in your terminal run:

    php artisan queue:listen 
    

    发送.