i have some code where i need to check if the locatin is supported okay, i am drawing a polygonthat contains some location then i send latitude and longitude and check if this latitude and longitude is contained within the same polygon.
i will be using st_contains method to check if this contains this, but i am unable to get this working, my knowledge in sql queries is not super strong so i would appreciate any help in this one.
public function getlocation()
{
$request_location = $req->loc . ' , ' . $req->lat;
$query = DB::raw("select * st_contains ( '$location->polygon', '$request_location') AS result") );
if ($query){
'success';
}
}
from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2li4Xoj
via IFTTT
Aucun commentaire:
Enregistrer un commentaire