Feature: Adding Sorting To Product List
This commit is contained in:
@@ -56,6 +56,14 @@ class ProductIndexer extends BaseProductIndexer
|
||||
];
|
||||
}
|
||||
|
||||
public function getSortableFields(): array
|
||||
{
|
||||
return [
|
||||
...parent::getSortableFields(),
|
||||
'price',
|
||||
];
|
||||
}
|
||||
|
||||
public function makeAllSearchableUsing(Builder $query): Builder
|
||||
{
|
||||
return parent::makeAllSearchableUsing($query)->with([
|
||||
|
||||
Reference in New Issue
Block a user