Skip to content

Commit

Permalink
[5.x] Fix ordering search results by date (#10939)
Browse files Browse the repository at this point in the history
  • Loading branch information
duncanmcclean authored Oct 11, 2024
1 parent 7bf2816 commit 5757396
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/Search/Result.php
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,10 @@ public function getCpBadge(): string

public function get($key, $fallback = null)
{
if ($key === 'date' && method_exists($this->searchable, 'date')) {
return $this->searchable->date();
}

return $this->searchable->get($key, $fallback);
}

Expand Down

0 comments on commit 5757396

Please sign in to comment.