Skip to content
This repository was archived by the owner on Oct 1, 2024. It is now read-only.

Commit 15d88e4

Browse files
author
Roy van der Veen
committed
Add pointz
1 parent b309f08 commit 15d88e4

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed

src/Schema/Blueprint.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,17 @@ public function point($column, $geomtype = 'GEOGRAPHY', $srid = '4326')
1313
return $this->addColumn('point', $column, compact('geomtype', 'srid'));
1414
}
1515

16+
/**
17+
* Add a point column on the table
18+
*
19+
* @param $column
20+
* @return \Illuminate\Support\Fluent
21+
*/
22+
public function pointz($column, $geomtype = 'GEOGRAPHY', $srid = '4326')
23+
{
24+
return $this->addColumn('pointz', $column, compact('geomtype', 'srid'));
25+
}
26+
1627
/**
1728
* Add a multipoint column on the table
1829
*

src/Schema/Grammars/PostgisGrammar.php

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,17 @@ public function typePoint(Fluent $column)
2121
return $this->createTypeDefinition($column, 'POINT');
2222
}
2323

24+
/**
25+
* Adds a statement to add a pointz geometry column
26+
*
27+
* @param \Illuminate\Support\Fluent $column
28+
* @return string
29+
*/
30+
public function typePointZ(Fluent $column)
31+
{
32+
return $this->createTypeDefinition($column, 'POINTZ');
33+
}
34+
2435
/**
2536
* Adds a statement to add a point geometry column
2637
*

0 commit comments

Comments
 (0)