I tried making fake data via a factory containing the point
column.
Coordinate columns in migration:
$table->point('coordinate');
I tried it at the factory:
'coordinate' => DB::raw("Point(" . fake()->latitude() . " " . fake()->longitude() . ")"), 'coordinate' => "Point(" . fake()->latitude() . " " . fake()->longitude() . ")", 'coordinate' => fake()->latitude() . " " . fake()->longitude(), 'coordinate' => [fake()->latitude(), fake()->longitude()],
Is there a way to fake the coordinates with the point
column or use raw sql in the factory?
I think you can try using
ST_GeomFromText