且构网

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

我收到错误“找不到类‘PredisClient’"在 Laravel 5.2 中

更新时间:2023-11-17 08:23:46

  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

  • 进入你的项目目录并安装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() 通过队列发送邮件.请参阅 文档.
  • 然后在你的终端运行:

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

    php artisan queue:listen 
    

    发送.