$sql = "SELECT *,earth_distance(ll_to_earth(team.lat, team.lng), ll_to_earth(23.1215939329,113.3096030895)) AS distance FROM team where earth_box(ll_to_earth(23.1215939329,113.3096030895),1000) @> ll_to_earth(team.lat, team.lng); ";
$result = DB::select( \DB::raw( $sql ) );
Hi , everyone.
This is my Controller code, My question is , how can i use Pagination add into this code to build my restful api ?
The second question , iOS or android will send the "next page" parameter , how to use it and find the next section data ?
If you know how to do it or any open resource in use , please tell me , thanks!!!
Aucun commentaire:
Enregistrer un commentaire