Skip to content

Commit

Permalink
Fixes bug with orderByDistanceFrom methods for Postgres and SQLServer
Browse files Browse the repository at this point in the history
  • Loading branch information
Adam Hutchison committed Mar 2, 2020
1 parent d6b0dcb commit 9d51963
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,4 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
* [1.4.0](#400---2020-01-14) - Adds support for DB builder
* [1.4.1](#400---2020-02-10) - Fixes config publish command
* [1.5.0](#400---2020-02-29) - Adds orderByDistanceFrom methods
* [1.5.1](#400---2020-02-29) - Fixes bug with orderByDistanceFrom methods for Postgres and SQLServer
2 changes: 1 addition & 1 deletion src/ScopeDrivers/PostgreSQLScopeDriver.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ public function orderByDistanceFrom(float $lat, float $long, string $orderDirect
$this->checkOrderDirectionIdentifier($orderDirection);

return $this->query->orderByRaw($this->getOrderByDistanceSQL($orderDirection), [
$long,
$lat,
$long,
]);
}

Expand Down
2 changes: 1 addition & 1 deletion src/ScopeDrivers/SQLServerScopeDriver.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@ public function orderByDistanceFrom(float $lat, float $long, string $orderDirect
$this->checkOrderDirectionIdentifier($orderDirection);

return $this->query->orderByRaw($this->getOrderByDistanceSQL($orderDirection), [
$long,
$lat,
$long,
]);
}

Expand Down

0 comments on commit 9d51963

Please sign in to comment.