category indexes

This commit is contained in:
merdan 2022-05-03 17:22:04 +05:00
parent 8440f3d5f7
commit 43dd256732
1 changed files with 1 additions and 1 deletions

View File

@ -18,7 +18,7 @@ class Suggestion extends JsonResource
'id' => $this->product_id ?? $this->id,
'type' => $this->suggestion_type,
'name' => $this->name,
$this->mergeWhen($this->suggestion_type != 'product',['description' => $this->description])
$this->mergeWhen($this->suggestion_type === 'category',['description' => $this->description])
];
}