How to query distances between two coordinates with Eloquent
问题 I know this has been ask many times. But I didn't figure out to make it according to my needs. I need to query the nearest users from another user. Basically, I have a users table this table has a one to one relation with the users_locations table which has a latitude and a longitude field. So I've seen this https://laravel.io/forum/04-23-2014-convert-this-geolocation-query-to-query-builder-for?page=1 and this may be the best solution. But my basic query is : \App\Model\User::whereNotIn('id',