@@ -134,7 +134,7 @@ public function scopeDistance($query, $geometryColumn, $geometry, $distance)
134134 {
135135 $ this ->isColumnAllowed ($ geometryColumn );
136136
137- $ query ->whereRaw ("st_distance(` $ geometryColumn`, ST_GeomFromText(?, ?, 'axis-order=long-lat' )) <= ? " , [
137+ $ query ->whereRaw ("st_distance(` $ geometryColumn`, ST_GeomFromText(?,? )) <= ? " , [
138138 $ geometry ->toWkt (),
139139 $ geometry ->getSrid (),
140140 $ distance ,
@@ -149,7 +149,7 @@ public function scopeDistanceExcludingSelf($query, $geometryColumn, $geometry, $
149149
150150 $ query = $ this ->scopeDistance ($ query , $ geometryColumn , $ geometry , $ distance );
151151
152- $ query ->whereRaw ("st_distance(` $ geometryColumn`, ST_GeomFromText(?, ?, 'axis-order=long-lat' )) != 0 " , [
152+ $ query ->whereRaw ("st_distance(` $ geometryColumn`, ST_GeomFromText(?,? )) != 0 " , [
153153 $ geometry ->toWkt (),
154154 $ geometry ->getSrid (),
155155 ]);
@@ -167,7 +167,7 @@ public function scopeDistanceValue($query, $geometryColumn, $geometry)
167167 $ query ->select ('* ' );
168168 }
169169
170- $ query ->selectRaw ("st_distance(` $ geometryColumn`, ST_GeomFromText(?, ?, 'axis-order=long-lat' )) as distance " , [
170+ $ query ->selectRaw ("st_distance(` $ geometryColumn`, ST_GeomFromText(?,? )) as distance " , [
171171 $ geometry ->toWkt (),
172172 $ geometry ->getSrid (),
173173 ]);
@@ -177,7 +177,7 @@ public function scopeDistanceSphere($query, $geometryColumn, $geometry, $distanc
177177 {
178178 $ this ->isColumnAllowed ($ geometryColumn );
179179
180- $ query ->whereRaw ("st_distance_sphere(` $ geometryColumn`, ST_GeomFromText(?, ?, 'axis-order=long-lat' )) <= ? " , [
180+ $ query ->whereRaw ("st_distance_sphere(` $ geometryColumn`, ST_GeomFromText(?,? )) <= ? " , [
181181 $ geometry ->toWkt (),
182182 $ geometry ->getSrid (),
183183 $ distance ,
@@ -192,7 +192,7 @@ public function scopeDistanceSphereExcludingSelf($query, $geometryColumn, $geome
192192
193193 $ query = $ this ->scopeDistanceSphere ($ query , $ geometryColumn , $ geometry , $ distance );
194194
195- $ query ->whereRaw ("st_distance_sphere( $ geometryColumn, ST_GeomFromText(?, ?, 'axis-order=long-lat' )) != 0 " , [
195+ $ query ->whereRaw ("st_distance_sphere( $ geometryColumn, ST_GeomFromText(?,? )) != 0 " , [
196196 $ geometry ->toWkt (),
197197 $ geometry ->getSrid (),
198198 ]);
@@ -209,7 +209,7 @@ public function scopeDistanceSphereValue($query, $geometryColumn, $geometry)
209209 if (!$ columns ) {
210210 $ query ->select ('* ' );
211211 }
212- $ query ->selectRaw ("st_distance_sphere(` $ geometryColumn`, ST_GeomFromText(?, ?, 'axis-order=long-lat' )) as distance " , [
212+ $ query ->selectRaw ("st_distance_sphere(` $ geometryColumn`, ST_GeomFromText(?,? )) as distance " , [
213213 $ geometry ->toWkt (),
214214 $ geometry ->getSrid (),
215215 ]);
@@ -223,7 +223,7 @@ public function scopeComparison($query, $geometryColumn, $geometry, $relationshi
223223 throw new UnknownSpatialRelationFunction ($ relationship );
224224 }
225225
226- $ query ->whereRaw ("st_ {$ relationship }(` $ geometryColumn`, ST_GeomFromText(?, ?, 'axis-order=long-lat' )) " , [
226+ $ query ->whereRaw ("st_ {$ relationship }(` $ geometryColumn`, ST_GeomFromText(?,? )) " , [
227227 $ geometry ->toWkt (),
228228 $ geometry ->getSrid (),
229229 ]);
@@ -279,7 +279,7 @@ public function scopeOrderBySpatial($query, $geometryColumn, $geometry, $orderFu
279279 throw new UnknownSpatialFunctionException ($ orderFunction );
280280 }
281281
282- $ query ->orderByRaw ("st_ {$ orderFunction }(` $ geometryColumn`, ST_GeomFromText(?, ?, 'axis-order=long-lat' )) {$ direction }" , [
282+ $ query ->orderByRaw ("st_ {$ orderFunction }(` $ geometryColumn`, ST_GeomFromText(?, ?)) {$ direction }" , [
283283 $ geometry ->toWkt (),
284284 $ geometry ->getSrid (),
285285 ]);
0 commit comments