导入数据到Algolia
php artisan scout:import "App\Student"
报错
[AlgoliaSearch\AlgoliaConnectionException]
Hosts unreachable: Resolving timed out after 1000 milliseconds,Resolving timed out
after 1000 milliseconds,Resolving timed out after 3000 milliseconds,Resolving tim
ed out after 3000 milliseconds
这是由于默认algoliasearch-client配置的连接超时时间为1秒,由于网络速度的原因,我们可以把连接时间修改一下 创建app/Services/Scout/EngineManager.php文件如下
打开app/Providers/AppServiceProvider.php,在boot()中加入以下代码
请参考 https://www.tech1024.cn/origi...