Skip to content

Commit

Permalink
Feature to make sorting chainable
Browse files Browse the repository at this point in the history
  • Loading branch information
danielkestler committed Sep 5, 2023
1 parent d912127 commit 6aeb758
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Classes/Search/MeilisearchQueryBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ class MeilisearchQueryBuilder implements QueryBuilderInterface, ProtectedContext
*/
public function sortDesc(string $propertyName): QueryBuilderInterface
{
$this->parameters['sort'] = [$propertyName . ':desc'];
$this->parameters['sort'][] = $propertyName . ':desc';
return $this;
}

Expand All @@ -57,7 +57,7 @@ public function sortDesc(string $propertyName): QueryBuilderInterface
*/
public function sortAsc(string $propertyName): QueryBuilderInterface
{
$this->parameters['sort'] = [$propertyName . ':asc'];
$this->parameters['sort'][] = $propertyName . ':asc';
return $this;
}

Expand Down

0 comments on commit 6aeb758

Please sign in to comment.