-
-
Save ahmadmarafa/c64656654e8d1ec0d0d8b962db5b7a1e to your computer and use it in GitHub Desktop.
TBolier\RethinkQL getNearest with filter
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$connection = r\connect("127.0.0.1" , null , "myApp") ; | |
$point = r\point((float) $request->pickup["lng"] , (float) $request->pickup["lat"]); | |
$data = r\table("connected")->getNearest($point , ["index" => "last_location"])->filter( | |
r\row("doc")("service_id")->eq( $request->service ) | |
)->run($connection) ; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment