我的Articles模型具有
use Searchable;
public function toSearchableArray()
{
$array['slug'] = $this->slug;
$array['updated_at'] = $this->updated_at;
$array['category'] = $this->subcategory->category->name;
$array['subcategory'] = $this->subcategory->name;
$array['copywriter'] = $this->copywriter->name;
$array['title_h1'] = strip_tags($this->title_h1);
return $array;
}
执行php artisan scout:导入“ App \ Article”,我所有的文章都发送到Algolia。
我需要以某种方式限制发送到Algolia的邮件,以便某些文章不会出现在我的搜索结果中。
在哪里/如何做类似不发送至阿尔及利亚的文章:
Article::where('visibility_id', '=', 1)