Skip to content

Commit

Permalink
Merge pull request #1748 from bakaphp/algolia-tuneup
Browse files Browse the repository at this point in the history
Add fields to algolia
  • Loading branch information
kaioken authored Jul 30, 2024
2 parents 2bef40b + 28411a1 commit e3c9668
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/Domains/Inventory/Products/Models/Products.php
Original file line number Diff line number Diff line change
Expand Up @@ -185,13 +185,18 @@ public function toSearchableArray(): array
'variants' => $this->variants->map(function ($variant) {
return $variant->toSearchableArray();
}),
'status' => [
'id' => $this->status->id ?? null,
'name' => $this->status->name ?? null,
],
'uuid' => $this->uuid,
'slug' => $this->slug,
'description' => $this->description,
'short_description' => $this->short_description,
'attributes' => [],
'apps_id' => $this->apps_id,
'is_deleted' => $this->is_deleted,
'published_at' => $this->published_at,
'created_at' => $this->created_at->format('Y-m-d H:i:s'),
];
$attributes = $this->attributes()->get();
foreach ($attributes as $attribute) {
Expand Down

0 comments on commit e3c9668

Please sign in to comment.