In case you install Redis with composer require predis/predis
, you need to add this line to .env
file:
REDIS_CLIENT=predis
Then clear cache by run this command: php artisan optimize:clear
An additional way
you can change this line in config/database.php
file:
From:
'client' => env('REDIS_CLIENT', 'phpredis'),
To:
'client' => env('REDIS_CLIENT', 'predis'),
Then clear cache by run this command: php artisan optimize:clear