File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -20,7 +20,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
20
20
21
21
- Added ` Castable ` to all geometries to use them as casters, instead of the ` GeometryWKBCast `
22
22
- Added ` Aliased ` Expression class as wrapper for ` AS ` in query selects
23
- - Add ` ->as() ` helper method on MagellanBaseExpression
23
+ - Added ` ->as() ` helper method on MagellanBaseExpression
24
24
- Added ` withMagellanCasts() ` as EloquentBuilder macro
25
25
- Added ` AsGeometry ` and ` AsGeography ` database expressions
26
26
Original file line number Diff line number Diff line change @@ -473,8 +473,8 @@ Since "hull" will return a geometry we need a cast for it. Instead of adding eac
473
473
$hullWithArea = Port::query()
474
474
->select([
475
475
'country',
476
- ST::convexHull(ST::collect('location'))->('hull'),
477
- ST::area(ST::convexHull(ST::collect('location')))->('area')
476
+ ST::convexHull(ST::collect('location'))->as ('hull'),
477
+ ST::area(ST::convexHull(ST::collect('location')))->as ('area')
478
478
])
479
479
->groupBy('country')
480
480
->withMagellanCasts() /* <======= */
@@ -485,8 +485,8 @@ $hullWithArea = Port::query()
485
485
$hullWithArea = Port::query()
486
486
->select([
487
487
'country',
488
- ST::convexHull(ST::collect('location'))->('hull'),
489
- ST::area(ST::convexHull(ST::collect('location')))->('area')
488
+ ST::convexHull(ST::collect('location'))->as ('hull'),
489
+ ST::area(ST::convexHull(ST::collect('location')))->as ('area')
490
490
])
491
491
->groupBy('country')
492
492
->withCasts(['hull' => Polygon::class]) /* <======= */
You can’t perform that action at this time.
0 commit comments