elasticquent / Elasticquent

Maps Laravel Eloquent models to Elasticsearch types
MIT License
1.35k stars 401 forks source link

Class not found #72

Open Aaronhdez opened 8 years ago

Aaronhdez commented 8 years ago

Hello,

I've recently made a clean installation of Lavarel 5.2.31 to try Elasticquent. No problem was notified during the installation process both framework and elastic, and subsequent update. Then, as the tutorial says, I added the respectives entries into providers and aliases:

Providers: Elasticquent\ElasticquentServiceProvider::class,

Aliases 'Es' => Elasticquent\ElasticquentElasticsearchFacade::class,

Updated composer.json again and it doesn't recognise Elasticquent\ElasticquentServiceProvider::class.

¿Any ideas?

Edit: I've also installed Laracasts/Flash and Mcamara/Laravel-Localization. Both run prefectly

chuangbo commented 8 years ago

What version are you using? The ElasticquentServiceProvider hasn't been release and only available at dev-master.

If you are using dev-master, can you find ElasticquentServiceProvider in vendor/composer/autoload_classmap.php? If not, composer dump-autoload and try again.

Aaronhdez commented 8 years ago

OK, this is the error. Composer.json indicates i'm using: "elasticquent/elasticquent": "^1.0", so composer probably took this version as the most stable.

Anyway, is there a problem if I use this version?

Edit: Now working perfectly. Thanks so much!

chuangbo commented 8 years ago

ElasticquentServiceProvider is not included in public released version. Please check https://github.com/elasticquent/Elasticquent/tree/v1.0.6 as per the version you are using.

chuangbo commented 8 years ago

Compare to 1.0.6, dev-master fixed few bugs, brings few new features and probably new bugs.

timgws commented 8 years ago

@chuangbo definitely a few new bugs as well. I am going to spend some time tomorrow fixing up the issues.

nathan-zhu commented 8 years ago

@chuangbo I got same problem here.

FatalErrorException in IndexController.php line 26:
Class 'Book' not found

I'm using dev-master, find ElasticquentServiceProvider in vendor/composer/autoload_classmap.php

follow install step to add provider, class and config file.

but still get Class not found. where is wrong for me, please let me know. thanks.