Feature: Adding Sorting To Product List

This commit is contained in:
2026-08-26 18:05:15 +03:00
parent 09844ec2b5
commit 751aff5939
4 changed files with 61 additions and 4 deletions
+8
View File
@@ -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([