Feature: Adding Sorting To Product List
This commit is contained in:
1 parent
09844ec2b5
commit
751aff5939
4 files changed
+61
-4
No files matched your search
@@ -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