【问题标题】:laravel scout not working with nWidart modules packagelaravel scout 无法使用 nWidart 模块包
【发布时间】:2021-03-15 13:08:32
【问题描述】:

我使用 nWidart 模块包 (https://github.com/nWidart/laravel-modules/issues/499) 和 Laravel scout 进行全文搜索。 Laravel scout 用这个命令导入模型

php artisan scout:import "App\Product"

App 目录 中创建模型时一切正常,但在 nWidart 包 laravel scout 中创建模型时显示导入正确

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

但不插入弹性数据库。

你可以在postman中用get方法http://localhost:9200/_search查看所有数据

【问题讨论】:

    标签: elasticsearch laravel-scout


    【解决方案1】:

    需要指定模块目录:

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

    为我工作。

    【讨论】:

      猜你喜欢
      • 2019-06-13
      • 2020-07-14
      • 2021-10-21
      • 2021-11-10
      • 1970-01-01
      • 2021-02-23
      • 2020-10-29
      • 2019-12-31
      • 1970-01-01
      相关资源
      最近更新 更多