I have table Item with the following fields(latitude,longitude) and I have a function which has as parameters (lat, lon, radius)
then I want to retrieve data which accept the equation (|lon-longitude|/|lat-latitude|)<= radius
I am using laravel 5.4 like the following:
public function calc($lon, $lat, $radius){
$result = Item::where()->get();
}
Any help how will the where condition be to do this equation!!