Skip to content

Commit f48aaf9

Browse files
Apply suggestions from code review
Co-authored-by: saibotk <tk@clickbar.dev>
1 parent c0f77f1 commit f48aaf9

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2020

2121
- Added `Castable` to all geometries to use them as casters, instead of the `GeometryWKBCast`
2222
- 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
2424
- Added `withMagellanCasts()` as EloquentBuilder macro
2525
- Added `AsGeometry` and `AsGeography` database expressions
2626

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -473,8 +473,8 @@ Since "hull" will return a geometry we need a cast for it. Instead of adding eac
473473
$hullWithArea = Port::query()
474474
->select([
475475
'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')
478478
])
479479
->groupBy('country')
480480
->withMagellanCasts() /* <======= */
@@ -485,8 +485,8 @@ $hullWithArea = Port::query()
485485
$hullWithArea = Port::query()
486486
->select([
487487
'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')
490490
])
491491
->groupBy('country')
492492
->withCasts(['hull' => Polygon::class]) /* <======= */

0 commit comments

Comments
 (0)