如何透過工廠製作點柱的假座標?
我嘗試透過包含 point
列的工廠製作虛假資料。
遷移中的座標列:
1 | $table ->point( 'coordinate' );
|
我在工廠嘗試過:
1 2 3 4 5 6 7 | 'coordinate' => DB::raw( "Point(" . fake()->latitude() . " " . fake()->longitude() . ")" ),
'coordinate' => "Point(" . fake()->latitude() . " " . fake()->longitude() . ")" ,
'coordinate' => fake()->latitude() . " " . fake()->longitude(),
'coordinate' => [fake()->latitude(), fake()->longitude()],
|
有沒有辦法偽造與point
列的座標或在工廠中使用原始sql?