nqxcode / laravel-lucene-search

Laravel 4.2, 5.* package for full-text search over Eloquent models based on ZF2 Lucene.
73 stars 28 forks source link

Not compatible with Laravel 5.1 #32

Closed beningreenjam closed 8 years ago

beningreenjam commented 8 years ago

I have Laravel 5.1.31 and have followed your setup guide with no trouble until I tried to publish the vendor files.

Simply running php artisan doesn't show any commands prefixed with "search" as indicated by your setup guide, despite having both the service provider and facade added to the /config/app.php as instructed.

nqxcode commented 8 years ago

It seems that the service provider is not loaded. Make sure that service provider is loaded. Try it in artisan tinker: in_array('Nqxcode\LuceneSearch\ServiceProvider', \App::getLoadedProviders())

what result?

beningreenjam commented 8 years ago

That returns true.

Maybe useful for me to point out that I'm also running on a PHP 7 powered vagrant homestead box.

beningreenjam commented 8 years ago

My bad!

I forgot that just yesterday I had tried out the php artisan config:cache command. So my /config/app.php file configuration was being loaded without the newly added service provider or facade alias. I ran php artisan config:clear then php artisan and the search commands instantly appeared.

So it was a service provider issue as you expected, but it doesn't explain why the above tinker-ing returned true before clearing the config cache, or why it wasn't working when it said it was loaded.