diff --git a/packages/Sarga/API/Http/Controllers/Products.php b/packages/Sarga/API/Http/Controllers/Products.php index 95715a76d..5838f069f 100644 --- a/packages/Sarga/API/Http/Controllers/Products.php +++ b/packages/Sarga/API/Http/Controllers/Products.php @@ -135,6 +135,9 @@ class Products extends ProductController ->query(fn ($query) => $query->select('id','name')->orderBy('name')) ->get(); + if($brands->count()){ + $brands->flatMap(fn ($val) => $val['type']='brand'); + } // $products = $this->productRepository->searchProductByAttribute($key);