search suggestions start

This commit is contained in:
merdan 2022-04-16 20:40:44 +05:00
parent cf486b000e
commit 9ceeb5bea7
1 changed files with 1 additions and 2 deletions

View File

@ -126,12 +126,11 @@ class Products extends ProductController
$queries = explode(' ', $key);
$brands = $brandRepository->getModel()::search(implode(' OR ', $queries))
->select('id','name')
->where('status',1)
->where('name','like','%' . urldecode($key) . '%')
->orderBy('name','asc')
->limit(10)
->get();
->get('id','name');
// $products = $this->productRepository->searchProductByAttribute($key);