search suggestions start

This commit is contained in:
merdan 2022-04-16 20:48:42 +05:00
parent f2ceadd056
commit 5a6e2ec38a
1 changed files with 6 additions and 6 deletions

View File

@ -125,11 +125,11 @@ class Products extends ProductController
$queries = explode(' ', $key);
$brands = $brandRepository->getModel()::search(implode(' OR ', $queries))
->where('status',1)
->orderBy('name','asc')
->take(10)
->get();
// $brands = $brandRepository->getModel()::search(implode(' OR ', $queries))
// ->where('status',1)
// ->orderBy('name','asc')
// ->take(10)
// ->get();
// $products = $this->productRepository->searchProductByAttribute($key);
@ -145,7 +145,7 @@ class Products extends ProductController
->take(10)
->get();
return $products->merge($brands);
return $products;
if($products->count() >0){