Skip to content

Commit

Permalink
Add fields to algolia
Browse files Browse the repository at this point in the history
  • Loading branch information
arfenis committed Jul 30, 2024
1 parent 423c014 commit 28411a1
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 28411a1

Please sign in to comment.