Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Class 'AlgoliaSearch\Version' not found

Tags:

php

laravel

I am trying to add algolia search system into my laravel(5.6) web app. For this,

I followed below instructions

  1. composer require laravel/scout

  2. php artisan vendor:publish --provider="Laravel\Scout\ScoutServiceProvider"

  3. use Searchable trait into my User model

  4. use Laravel\Scout\Searchable;

  5. composer require algolia/algoliasearch-client-php

  6. php artisan scout:import "App\User"

I also set (ALGOLIA_APP_ID) and (ALGOLIA_SECRET) both of my .env and scout.php file

I also added some dummy data to my users table and when I try to import those data to my algolia site by using (php artisan scout:import "App\User") this command I am getting this error (Class 'AlgoliaSearch\Version' not found)

enter image description here

enter image description here

enter image description here

enter image description here

enter image description here

like image 568
Mehedi Hasan Methun Avatar asked Sep 05 '26 08:09

Mehedi Hasan Methun


1 Answers

I had the almost same problem

When I was doing the batch import using the command php artisan scout:import got this Error: In EngineManager.php line 31: Class 'AlgoliaSearch\Version' not found

Downgrading the version fixed it

composer require algolia/algoliasearch-client-php:^1.27
like image 157
kireeti9 Avatar answered Sep 07 '26 23:09

kireeti9



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!