search suggestions start

This commit is contained in:
merdan 2022-04-17 15:02:57 +05:00
parent a85a820a1f
commit cf39cc4951
1 changed files with 3 additions and 2 deletions

View File

@ -132,6 +132,7 @@ class Products extends ProductController
// ->where('status',1)
// ->orderBy('name','asc')
->take(10)
->query(fn ($query) => $query->select('id','name')->orderBy('name'))
->get();
@ -147,9 +148,9 @@ class Products extends ProductController
->where('locale', $locale)
->take(10)
->query(fn ($query) => $query->select('id','name')
->addSelect(DB::raw("\'product\' as type" ))
// ->addSelect(DB::raw("\'product\' as type" ))
->orderBy('name'))
->get();;
->get();
return [$products,$brands];