2

I installed redis by

composer require  predis/predis

then I changed my config/queue.php like this:

'default' => env('QUEUE_DRIVER', 'redis'),

however when I try to use redis:

use Illuminate\Support\Facades\Redis;
Redis::connection();

I get this error :

FatalErrorException in Database.php line 63: Class 'Predis\Client' not found

Edit:

Actually I installed Redis on local host and I uploaded only 'vendor' folder to server. Can it be because of, while installation is there any other file created except from in "vendor" folder?

What can be the problem? I use laravel 5.0 thanks,,

Ali insan Soyaslan
  • 836
  • 5
  • 14
  • 33
  • What is the output of the command `composer info | grep predis`? – David Smith Jul 27 '16 at 23:04
  • 1
    Try `composer require predis/predis` – Damien Nov 28 '17 at 14:56
  • @DavidSmith I get empty response for `composer info | grep predis`. However, for `composer info | grep redis` I get `doctrine/cache 2.1.1 PHP Doctrine Cache library is a popular cache implementation ...` – Pathros May 18 '22 at 16:21

1 Answers1

1

After setting your .env file for redis try running php artisan config:cache.

Damien
  • 1,140
  • 15
  • 22
halloH6c
  • 11
  • 1