3

I get longitude and latitude and want to store the location with [Spatial Point] with mysql,,

what's the queries and functions that can help me to insert the values ..

Mahmoud Nassar
  • 609
  • 7
  • 16

1 Answers1

3

You can use DB::raw() to do this:

    DB::table('table')->insert([
        'field' => DB::raw("SPECIAL_FUNC(X)"),
    ]);

Examples: http://dev.mysql.com/doc/refman/4.1/en/point-property-functions.html http://dev.mysql.com/doc/refman/5.0/en/populating-spatial-columns.html

Vladislav Rastrusny
  • 29,378
  • 23
  • 95
  • 156