Answer the question
In order to leave comments, you need to log in
How to feed data from linked table to Elasticsearch?
There is a site with the Laravel Scout Elasticsearch Driver
installed.
The data itself in Scout is imported from the App\Models\Hotel model via php artisan scout:import "App\Models\Hotel"
Model content:
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Laravel\Scout\Searchable;
class Hotel extends Model
{
use HasFactory;
use Searchable;
public $fillable = ["name", "address"];
public function hotels_images()
{
return $this->hasMany('App\Models\Image');
}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question