Answer the question
In order to leave comments, you need to log in
Why can't Elasticsearch and Laravel Scout be friends?
I decided to test Elasticsearch in conjunction with Laravel Scout. I took this article as a basis (I tried others, the final result is the same as in the subject)
Attempt No. 1
composer require elasticsearch/elasticsearch
- I install ES for Laravel myself
composer require laravel/scout
- I install the latest version of Scout (9.1)
composer require tamayo/laravel-scout-elastic
- I install the package recommended everywhere for the Scout and ES bundle
An error occurs:
Your requirements could not be resolved to an installable set of packages.
Problem 1
- tamayo/laravel-scout-elastic[8.0.0, ..., 8.0.2] require laravel/scout ^8.0 -> found laravel/scout[v8.0.0, ..., 8.x-dev] but it conflicts with your root composer.json require (^9.1).
- Root composer.json requires tamayo/laravel-scout-elastic ^8.0 -> satisfiable by tamayo/laravel-scout-elastic[8.0.0, 8.0.1, 8.0.2].
composer require elasticsearch/elasticsearch
- install ES for Laravel itself composer require tamayo/laravel-scout-elastic
- install the same package, counting that he will pick up the required version of laravel/scout for himself as a dependency, in confirmation of this I see in the console that he pulled up laravel/scout: 8.6.1 Laravel\Scout\ScoutServiceProvider::class,
ScoutEngines\Elasticsearch\ElasticsearchProvider::class,
php artisan vendor:publish
Class 'ScoutElastic\ScoutElasticServiceProvider' not found
Answer the question
In order to leave comments, you need to log in
According to the documentation , there is no need to specify any service providers in the app.php file.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question