Class "Redis" not found when run this command ( php artisan demo:install )
Closed this issue · 2 comments
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()
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
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