Do you have the PHP extension installed?
Mar 17, 2021
17
Level 1
Class 'Redis' not found
I want to build chat but when i start using redis it throw me that error.I have installed Redis on my project my .env
BROADCAST_DRIVER=redis
REDIS_HOST=127.0.0.1
REDIS_PASSWORD=null
REDIS_PORT=6379
route for test if work
Route::get('/fire', function () {
event(new \App\Events\NewMessageAdded());
return 'ok';
});
What i am doing wrong ????
Level 3
Which version of laravel are you using ?
If you are using Laravel 8, in the database.php file, replace the following line:
'client' => env('REDIS_CLIENT', 'phpredis')
to:
'client' => env('REDIS_CLIENT', 'predis')
then, add the predis dependency with composer:
composer require predis/predis
81 likes
Please or to participate in this conversation.