Čamo's avatar
Level 3

How to insert geo point into the Postgis database?

I have Postgis databse which contains geography column created in migration via $table->point(). Now I need to insert the lat and long values into this field. Can somebody help me please how to do it?

0 likes
1 reply
Čamo's avatar
Level 3

So I find out the solution. This is what I need to add to insert data array.

$data['geo_point'] = "point({$data['lat']} {$data['long']})";

Please or to participate in this conversation.