Skip to content

Commit febf7f9

Browse files
committed
Merge remote-tracking branch 'origin/main'
2 parents 339b26c + efc7684 commit febf7f9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Filters/RadiusFilter.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,8 @@ public function apply(Builder $query, array $data = []): Builder
8282
// $sql = "((ACOS(SIN(? * PI() / 180) * SIN(" . $latName . " * PI() / 180) + COS(? * PI() / 180) * COS(" .
8383
// $latName . " * PI() / 180) * COS((? - " . $lngName . ") * PI() / 180)) * 180 / PI()) * 60 * ?) as distance";
8484

85-
$sql = "((ACOS(SIN($latitude * PI() / 180) * SIN(" . $latName . " * PI() / 180) + COS($latitude * PI() / 180) * COS(" .
86-
$latName . " * PI() / 180) * COS(($longitude - " . $lngName . ") * PI() / 180)) * 180 / PI()) * 60 * %f) < $distance";
85+
$sql = "((ACOS(SIN($latitude * PI() / 180) * SIN(".$latName." * PI() / 180) + COS($latitude * PI() / 180) * COS(".
86+
$latName." * PI() / 180) * COS(($longitude - ".$lngName.") * PI() / 180)) * 180 / PI()) * 60 * %f) < $distance";
8787

8888
$sql = sprintf($sql, $kilometers ? (1.1515 * 1.609344) : 1.1515);
8989

0 commit comments

Comments
 (0)