Article From:https://www.cnblogs.com/fps2tao/p/9967917.html

laravel5.7Class’Predis Client’not found

 

First, I checked the configuration, and composer is not wrong, with the native redis can also be normal connection and read and write.

 

My redis is installed with (centos7) yum, and the redis extension of PHP installs PHP extension PhpRedis through PECL.

PECL Installed PHP extension PhpRedis in configuration fileIt will be slightly different. 

To use the PhpRedis extension, you need to configure the Redisclient Option is modified tophpredis,This option is located in the configuration fileconfig/database

'redis' => [

    'client' => 'phpredis',

    // Rest of Redis configuration...
],

 

It turned out to be predis.

 

 

Reference: https://laravelacademy.org/post/9582.html

 

Leave a Reply

Your email address will not be published. Required fields are marked *