'Connection refused [tcp://127.0.0.1:6379] laravel 8
I install Redis cach driver in laravel 8 project. After refresh I am getting this error Connection refused [tcp://127.0.0.1:6379]. I cant find out my problem. where is the problem. anyone can tell me.
i used this commend by the
composer require predis/predis
.env file : CACHE_DRIVER=redis
I used this command in the controller :
public function homeproductdisplay () {
$data= Cache()->remember('Product', 60, function() {
return DB::table('Product')
->select(array('Product_name','status','slug','regular_price','gallery_image'))
->where('status', '=', 'Instock')
->limit(30)
->get();
});
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
