I'm getting error "Class 'Predis\Client' not found" in Laravel 5.2

onerciller picture onerciller · Jan 18, 2016 · Viewed 47.4k times · Source

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.

Answer

Abhishek picture Abhishek · Jan 19, 2016
  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
    
  3. Go to your project directory and install composer:

    composer require predis/predis

  4. Go to your .env file and add Queue driver:

    QUEUE_DRIVER=redis
    
  5. use Mail::queue() to send mail via queue. See Doc.
  6. And in your terminal run:

    php artisan queue:listen 
    

    to send.