|
| 1 | +<?php |
| 2 | +namespace Grimzy\LaravelSpatial\Schema; |
| 3 | + |
| 4 | +class Blueprint extends \Illuminate\Database\Schema\Blueprint |
| 5 | +{ |
| 6 | + /** |
| 7 | + * Add a geometry column on the table |
| 8 | + * |
| 9 | + * @param string $column |
| 10 | + * @return \Illuminate\Support\Fluent |
| 11 | + */ |
| 12 | + public function geometry($column) |
| 13 | + { |
| 14 | + return $this->addColumn('geometry', $column); |
| 15 | + } |
| 16 | + |
| 17 | + /** |
| 18 | + * Add a point column on the table |
| 19 | + * |
| 20 | + * @param $column |
| 21 | + * @return \Illuminate\Support\Fluent |
| 22 | + */ |
| 23 | + public function point($column) |
| 24 | + { |
| 25 | + return $this->addColumn('point', $column); |
| 26 | + } |
| 27 | + |
| 28 | + /** |
| 29 | + * Add a linestring column on the table |
| 30 | + * |
| 31 | + * @param $column |
| 32 | + * @return \Illuminate\Support\Fluent |
| 33 | + */ |
| 34 | + public function linestring($column) |
| 35 | + { |
| 36 | + return $this->addColumn('linestring', $column); |
| 37 | + } |
| 38 | + |
| 39 | + /** |
| 40 | + * Add a polygon column on the table |
| 41 | + * |
| 42 | + * @param $column |
| 43 | + * @return \Illuminate\Support\Fluent |
| 44 | + */ |
| 45 | + public function polygon($column) |
| 46 | + { |
| 47 | + return $this->addColumn('polygon', $column); |
| 48 | + } |
| 49 | + |
| 50 | + /** |
| 51 | + * Add a multipoint column on the table |
| 52 | + * |
| 53 | + * @param $column |
| 54 | + * @return \Illuminate\Support\Fluent |
| 55 | + */ |
| 56 | + public function multipoint($column) |
| 57 | + { |
| 58 | + return $this->addColumn('multipoint', $column); |
| 59 | + } |
| 60 | + |
| 61 | + /** |
| 62 | + * Add a multilinestring column on the table |
| 63 | + * |
| 64 | + * @param $column |
| 65 | + * @return \Illuminate\Support\Fluent |
| 66 | + */ |
| 67 | + public function multilinestring($column) |
| 68 | + { |
| 69 | + return $this->addColumn('multilinestring', $column); |
| 70 | + } |
| 71 | + |
| 72 | + /** |
| 73 | + * Add a multipolygon column on the table |
| 74 | + * |
| 75 | + * @param $column |
| 76 | + * @return \Illuminate\Support\Fluent |
| 77 | + */ |
| 78 | + public function multipolygon($column) |
| 79 | + { |
| 80 | + return $this->addColumn('multipolygon', $column); |
| 81 | + } |
| 82 | + |
| 83 | + /** |
| 84 | + * Add a geometrycollection column on the table |
| 85 | + * |
| 86 | + * @param $column |
| 87 | + * @return \Illuminate\Support\Fluent |
| 88 | + */ |
| 89 | + public function geometrycollection($column) |
| 90 | + { |
| 91 | + return $this->addColumn('geometrycollection', $column); |
| 92 | + } |
| 93 | +} |
0 commit comments