阅读(2469) (6)

Laravel 8 批量导入

2021-07-09 14:25:08 更新

如果你想安装 Scout 到已存在的项目中,你可能已经有了想要导入搜索驱动的数据库记录。Scout 提供了 Artisan 命令 import 用来导入所有已存在的记录到搜索索引:

php artisan scout:import "AppModelsPost"   

flush 命令可用于从搜索索引中删除所有模型的记录:

php artisan scout:flush "AppModelsPost"