Open
Description
Hi! I decided to try your package in PHPUnit:
$point = new Point();
$point->point = new \Grimzy\LaravelMysqlSpatial\Types\Point(40.7484404, -73.9878441);
$point->save();
an error occurs when running the test:
SQLSTATE[42000]: Syntax error or access violation: 1582 Incorrect parameter count in the call to native function 'ST_GeomFromText' (SQL: insert into
points
(point
) values (ST_GeomFromText(POINT(-73.9878441 40.7484404), 0, 'axis-order=long-lat'))
but if you delete the line ", 'axis-order=long-lat' " in the file SpatialExpression.php then saving will work fine, see screenshot:
I also tried running the raw query leaving the string ", 'axis-order=long-lat' " and it worked without an error:
DB::insert(
"insert into `points` (`point`) values (ST_GeomFromText('POINT(-73.9878441 40.7484404), 0, axis-order=long-lat'))"
);
Please help :)