Mehrdad Masoumi
Mehrdad Masoumi

Reputation: 410

laravel scout not working with nWidart modules package

I use nWidart module package (https://github.com/nWidart/laravel-modules/issues/499) and Laravel scout for full text search. Laravel scout import model with this command

php artisan scout:import "App\Product"

when model created in App directory everything is ok but when model created in nWidart package laravel scout show import correctly

Imported [\Modules\Product\Entities\Product] models up to ID: 304
All [\Modules\Product\Entities\Product] records have been imported.

but not insert in elastic database.

you can see all data with get method http://localhost:9200/_search in postman

Upvotes: 0

Views: 341

Answers (1)

Knowhow Kwaramba
Knowhow Kwaramba

Reputation: 11

You need to specify the module directory:

 php artisan scout:import "Modules\{module-name}\Entities\{entity-name}"

Worked for me.

Upvotes: 0

Related Questions