category indexes
This commit is contained in:
parent
9150c75945
commit
acba9f6689
|
|
@ -57,7 +57,7 @@ class SearchController extends Controller
|
|||
$key = request('search');
|
||||
$categories = CategoryTranslationProxy::modelClass()::where('name', 'like', '%'.$key.'%')
|
||||
->distinct()
|
||||
->select('category_id as id','name')
|
||||
->select('category_id as id','name','description')
|
||||
->groupBy('category_id')
|
||||
->take(10)
|
||||
->orderBy('name')
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@ class Suggestion extends JsonResource
|
|||
'id' => $this->product_id ?? $this->id,
|
||||
'type' => $this->suggestion_type,
|
||||
'name' => $this->name,
|
||||
'description' => $this->description,
|
||||
];
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue