RTippin / messenger-demo

Laravel messenger demo app using rtippin/messenger. Private and group threads with real-time messaging, reactions, attachments, calling, chat bots, and more!
https://tippindev.com
151 stars 47 forks source link

Class "Redis" not found when run this command ( php artisan demo:install ) #13

Closed git-e-001 closed 2 years ago

git-e-001 commented 2 years ago

Class "Redis" not found

at vendor/laravel/framework/src/Illuminate/Redis/Connectors/PhpRedisConnector.php:75 71▕ @throws \LogicException 72▕ / 73▕ protected function createClient(array $config) 74▕ { ➜ 75▕ return tap(new Redis, function ($client) use ($config) { 76▕ if ($client instanceof RedisFacade) { 77▕ throw new LogicException( 78▕ extension_loaded('redis') 79▕ ? 'Please remove or rename the Redis facade alias in your "app" configuration file in order to avoid collision with the PHP Redis extension.'

  +24 vendor frames 

25 artisan:37 Illuminate\Foundation\Console\Kernel::handle()

RTippin commented 2 years ago

Please check my README. If you do not plan to install phpredis, you must use different drivers for laravels services.

https://github.com/RTippin/messenger-demo/blob/master/README.md#prerequisites https://github.com/RTippin/messenger-demo/blob/master/.env.example#L18-L20

Pham-Thanh-Truong commented 1 year ago

Class "Redis" not found

at vendor/laravel/framework/src/Illuminate/Redis/Connectors/PhpRedisConnector.php:75 71▕ @throws \LogicException 72▕ / 73▕ protected function createClient(array $config) 74▕ { ➜ 75▕ return tap(new Redis, function ($client) use ($config) { 76▕ if ($client instanceof RedisFacade) { 77▕ throw new LogicException( 78▕ extension_loaded('redis') 79▕ ? 'Please remove or rename the Redis facade alias in your "app" configuration file in order to avoid collision with the PHP Redis extension.'

  +24 vendor frames 

25 artisan:37 Illuminate\Foundation\Console\Kernel::handle()

In the config/database.php file, replace

'client' => env('REDIS_CLIENT', 'phpredis')

to

'client' => env('REDIS_CLIENT', 'predis')

then, add the predis

composer require predis/predis