basemkhirat / elasticsearch

The missing elasticsearch ORM for Laravel, Lumen and Native php applications
MIT License
401 stars 130 forks source link

Undefined variable: data #86

Closed TheAhmedGad closed 5 years ago

TheAhmedGad commented 6 years ago

when call php artisan es:indices:list from command line

It gives me

ErrorException : Undefined variable: data

at /vendor/basemkhirat/elasticsearch/src/Commands/ListIndicesCommand.php:96 92| $data[] = $row; 93| 94| } 95| 96| return $data; 97| 98| } 99| 100| /**

pildit commented 6 years ago

Make sure you add the necessary info in config/es.php

ayrtonvwf commented 5 years ago

Just for clarification, I faced the same issue and I realized that I didn't have any index in my elasticsearch, so I created it and configured it in the config/es.php and it worked.

Suggestion: handle this error and provide a useful message.

Maybe close this issue?

TheAhmedGad commented 5 years ago

Yes @pildit and @ayrtonvwf you were right it was my mistake that I didn't configured the config/es.php file first Thanks Guys :)