Level 12
Okay that was easy. Sorry for the question:
public static function nearyou($R, $userlocation, $distance){
return static::select('*')
->selectRaw('? * 2 * ASIN(SQRT(POWER(SIN((? - abs(dest.lat)) * pi()/180 / 2),2)
+ COS(? * pi()/180 ) * COS(abs(dest.lat) * pi()/180) * POWER(SIN((? - dest.lng) * pi()/180 / 2), 2) ))
as distance', [$R, $userlocation['lat'], $userlocation['lat'], $userlocation['lng']])
->from('sell_maps as dest')
->havingRaw('distance < ?', [$distance])
->orderBy('distance')
->take(10)
->get();
}