我正在尝试将 LaravelScout与 docker 一起使用,我按照文档Laravel Scout Docs
进行了安装所需的所有步骤,一切都按预期启动并运行。但每当我尝试搜索数据时,我都会收到此错误cURL error 7: Failed to connect to 127.0.0.1 port 7720: Connection refused。我正在将请求发送insomnia到laravel路由网络。
curl -kvs --http2 --request GET 'http://localhost:7720/indexes'它工作正常并返回Connected to localhost (127.0.0.1) port 7720 (#0),但每当我发送时,insomnia我都会收到错误重现错误的步骤
Event尝试通过关键字搜索模型PENDING。
\App\Models\Event::search('PENDING')->get()
事件模型类
<?php
namespace App\Models;
use Illuminate\Support\Str;
use Laravel\Scout\Searchable;
use Database\Factories\EventFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Factories\HasFactory;
class Event extends Model
{
use HasFactory;
use Searchable; …Run Code Online (Sandbox Code Playgroud)