Re,
I have the following query:
$property =
Property::select(
DB::raw(\"title, lat, lng, (
3959 * acos(
co
I encountered same issue just recently and the answer is in that error message mixed named and positional parameters. In your case, the :lat and :lng are named parameters while you have $radius as positional. So one possible fix to your issue is make use of havingRaw() and apply named parameters.
--havingRaw('distance < :radius', ['radius' => $radius])