File tree Expand file tree Collapse file tree 2 files changed +47
-0
lines changed Expand file tree Collapse file tree 2 files changed +47
-0
lines changed Original file line number Diff line number Diff line change @@ -195,4 +195,26 @@ public function money($column)
195
195
{
196
196
return $ this ->addColumn ('money ' , $ column );
197
197
}
198
+
199
+ /**
200
+ * Create a new geo point column on the table.
201
+ *
202
+ * @param string $column
203
+ * @return \Illuminate\Support\Fluent
204
+ */
205
+ public function geoPoint ($ column )
206
+ {
207
+ return $ this ->addColumn ('geoPoint ' , $ column );
208
+ }
209
+
210
+ /**
211
+ * Create a new geo polygon column on the table.
212
+ *
213
+ * @param string $column
214
+ * @return \Illuminate\Support\Fluent
215
+ */
216
+ public function geoPolygon ($ column )
217
+ {
218
+ return $ this ->addColumn ('geoPolygon ' , $ column );
219
+ }
198
220
}
Original file line number Diff line number Diff line change @@ -218,4 +218,29 @@ protected function typeDateRange(Fluent $column)
218
218
{
219
219
return 'daterange ' ;
220
220
}
221
+
222
+
223
+ /**
224
+ * Create the column definition for a geo point (latitude, longitude).
225
+ *
226
+ * @param \Illuminate\Support\Fluent $column
227
+ * @return string
228
+ */
229
+
230
+ protected function typeGeoPoint (Fluent $ column )
231
+ {
232
+ return 'geography(Point,4326) ' ;
233
+ }
234
+
235
+ /**
236
+ * Create the column definition for a geo polygon represented by a list of points (vertices of the polygon).
237
+ *
238
+ * @param \Illuminate\Support\Fluent $column
239
+ * @return string
240
+ */
241
+ protected function typeGeoPolygon (Fluent $ column )
242
+ {
243
+ return 'geography(Polygon,4326) ' ;
244
+ }
245
+
221
246
}
You can’t perform that action at this time.
0 commit comments