The raw query in the select is using AS to calculate the distance. I just copied it from an old Laravel 4 project so I'm not sure what's changed. Maybe try changing -> ...
DOWNLOAD: https://byltly.com/2fafks
DOWNLOAD: https://byltly.com/2fafks
find-nearest-places-by-latitude-longitude-in-laravel
How to find nearest location by latitude and longitude?, * PI() / 180) * COS(($lon – lon) * PI() / 180)) * 180 / PI()) * 60 * 1.1515) AS 'distance' FROM loc_coordinate ... 939c2ea5af
Comments