This code retrieves one post from DB but sends it 7 times to Algolia ...
There are 7 items in the database
6 records with status = PUBLISHED
1 post with status = DRAFT
public function toSearchableArray()
{
$array = Post::where('status', '=', static::PUBLISHED)->toArray();
return $array;
}
What am I doing wrong ??