class Book extends Model
{
use ElasticScoutDriverPlus\Searchable;
public function shardRouting()
{
return $this->user->id;
}
}
class Book extends Model
{
use ElasticScoutDriverPlus\Searchable;
public function toSearchableArray()
{
return [
'title' => $this->title,
'price' => $this->price,
'author' => $this->author->only(['name', 'phone_number']),
];
}
}
class Book extends Model
{
use ElasticScoutDriverPlus\Searchable;
public function toSearchableArray()
{
return [
'title' => $this->title,
'price' => $this->price,
'author' => $this->author->only(['name', 'phone_number']),
];
}
public function searchableWith()
{
return ['author'];
}
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.