clickbar/laravel-magellan
This package provides functionality for working with the postgis extension in Laravel.
2.2.0
1.0M downloads/mo
#2728 most downloaded on Packagist
clickbar/laravel-magellan
What this package is like to depend on
Last release 3 months ago
11 May 2026
Ships fairly regularly
a new release about every 3 months
Nearly every release is documented
notes for 20 of 20 stable releases
Nothing withdrawn
no release was ever pulled
4 years old
20 releases · first in 2023
3 releases in the last 12 months
see the full history below
Release timeline
20 releases · Jan 2023 to May 2026Releases
latest 20-
2.2.011 May 2026Release notes
Open source →What's Changed
- Custom srid geojson by @mauritskorse in #164
New Contributors
- @mauritskorse made their first contribution in #164
Full Changelog: 2.1.0...2.2.0
Release notes
Open source →Added
- Added custom SRID support for Geojson parser and validation (
GeojsonParser,TransformsGeojsonGeometry,GeometryGeojsonRule)
-
2.1.017 Mar 2026Release notes
Open source →What's Changed
Added
- Added Laravel 13.x support
- Added facades for parsers (
WKBParser,WKTParser,GeojsonParser) and generators (WKBGenerator,WKTGenerator,
GeojsonGenerator)
Fixed
- Fixed dirty comparison of Model attributes using the Geometry casts
Full Changelog: 2.0.1...2.1.0
Release notes
Open source →Added
- Added Laravel 13.x support
- Added facades for parsers (
WKBParser,WKTParser,GeojsonParser) and generators (WKBGenerator,WKTGenerator,GeojsonGenerator)
Fixed
- Fixed dirty comparison of Model attributes using the Geometry casts
-
2.0.113 Aug 2025Release notes
Open source →What's Changed
Fixed
- Fixed using the casts after serialization, e.g. in queueable anonymous event listeners. (thanks @Henridv #149)
New Contributors
Thanks for fixing bugs, improving documentation and the project!
- @RyanPaiva56 made their first contribution in #143
- @mstaack made their first contribution in #146
- @Henridv made their first contribution in #149
Full Changelog: 2.0.0...2.0.1
Release notes
Open source →Fixed
- Fixed using the casts after serialization, e.g. in queueable anonymous event listeners. (thanks @henridv #149)
-
2.0.019 Mar 2025Release notes
Open source →What's Changed
We are excited to finally release a huge overhaul on the DX with Laravel Magellan!
Please check out the upgrade guide for more recommended steps.
Breaking
- Removed support for deprecated Laravel versions 9.x & 10.x
- Require at least PHP 8.2
- Removed the
HasPostgisColumnstrait &$postgisColumnsproperty. - Removed
GeometryWKBCast - Refactored
BBoxCastto be generic & internal, please use Box subclasses directly - Removed automatic SRID transformation
- Removed st prefixed builder functions (e.g.
stSelect,stWhere, ...) - Removed
GeometryTypeEnum - Renamed
toStringtotoRawSqlonBoxclasses - Removed Doctrine DBAL types & registration (was used for older Laravel versions)
GeometryGeojsonRuleis not directly invokable anymore
Added
- Added Laravel 12 & PHP 8.4 support
- Added
Castableto all geometries to use them as casters, instead of theGeometryWKBCast - Added
Castableto all boxes to use them as casters, instead of theBBoxCast - Added
AliasedExpression class as wrapper forASin query selects- Added
->as()helper method on MagellanBaseExpression
- Added
- Added
withMagellanCasts()as EloquentBuilder macro - Added
AsGeometryandAsGeographydatabase expressions - Added
fromString()toBoxclasses to create a box from a string - Added
Stringableinterface to all box classes - Added
JsonSerializabletoBox2DandBox3D
Improved
- Validate the structure of Geometry coordinates to be an array in the
GeojsonParserand fail if not - Use of ST functions directly in the Laravel default builder methods
- Use of ST functions directly in Model::create array
- Renamed parameters of ST functions that can receive geometry or geography from
$geometryto$geometryOrGeography - Geometry & Box implements
Expressionand therefore can be used in->select(...)directly now
Fixed
- Fixed only using default PHP string precision in Box
toRawSqlmethods, now uses the maximum precision
Removed
- Removed
magellan:update-postgis-columnscommand - Removed
magellan.eloquent&magellan.model_directoriesconfigs
New Contributors
Full Changelog: 1.8.0...2.0.0
Release notes
Open source →Please check out the upgrade guide for more recommended steps.
Breaking
- Removed support for deprecated Laravel versions 9.x & 10.x
- Require at least PHP 8.2
- Removed the
HasPostgisColumnstrait &$postgisColumnsproperty. - Removed
GeometryWKBCast - Refactored
BBoxCastto be generic & internal, please use Box subclasses directly - Removed automatic SRID transformation
- Removed st prefixed builder functions (e.g.
stSelect,stWhere, ...) - Removed
GeometryTypeEnum - Renamed
toStringtotoRawSqlonBoxclasses - Removed Doctrine DBAL types & registration (was used for older Laravel versions)
GeometryGeojsonRuleis not directly invokable anymore
Added
- Added Laravel 12 & PHP 8.4 support
- Added
Castableto all geometries to use them as casters, instead of theGeometryWKBCast - Added
Castableto all boxes to use them as casters, instead of theBBoxCast - Added
AliasedExpression class as wrapper forASin query selects- Added
->as()helper method on MagellanBaseExpression
- Added
- Added
withMagellanCasts()as EloquentBuilder macro - Added
AsGeometryandAsGeographydatabase expressions - Added
fromString()toBoxclasses to create a box from a string - Added
Stringableinterface to all box classes - Added
JsonSerializabletoBox2DandBox3D
Improved
- Validate the structure of Geometry coordinates to be an array in the
GeojsonParserand fail if not - Use of ST functions directly in the Laravel default builder methods
- Use of ST functions directly in Model::create array
- Renamed parameters of ST functions that can receive geometry or geography from
$geometryto$geometryOrGeography - Geometry & Box implements
Expressionand therefore can be used in->select(...)directly now
Fixed
- Fixed only using default PHP string precision in Box
toRawSqlmethods, now uses the maximum precision
Removed
- Removed
magellan:update-postgis-columnscommand - Removed
magellan.eloquent&magellan.model_directoriesconfigs
-
1.9.011 May 2026Release notes
Open source → -
1.8.025 Feb 2025Release notes
Open source →What's Changed
- Support for Laravel 12.x
New Contributors
- @laravel-shift made their first contribution in #132
Full Changelog: 1.7.1...1.8.0
-
1.7.103 Jan 2025Release notes
Open source →Fixed
- Fixed only using a precision of 6 decimal digits in WKT, now uses the maximum precision
-
1.7.027 Dec 2024Release notes
Open source →Added
- PostGIS ST_LineSubstring support
- PostGIS ST_LineFromEncodedPolyline support
- PostGIS ST_LineLocatePoint support
- Added
ST::asGeoJsonfunction to convert geometries to GeoJSON via the database
Fixed
- Fixed
Expressiontypes in SRID-related functions - Fixed missing schema prefix for generated SQL of first-level
STfunctions - Fixed numeric SRID queries in
ST::transformandST::setSRID(thanks @BezBIS #91) - Fixed
ST::buffer&ST:offsetCurve: Correctly renamedstyleMitreLeveltostyleMitreLimit
New Contributors
Full Changelog: 1.6.1...1.7.0
Release notes
Open source →Added
- PostGIS ST_LineSubstring support
- PostGIS ST_LineFromEncodedPolyline support
- PostGIS ST_LineLocatePoint support
- Added
ST::asGeoJsonfunction to convert geometries to GeoJSON via the database
Fixed
- Fixed
Expressiontypes in SRID-related functions - Fixed missing schema prefix for generated SQL of first-level
STfunctions - Fixed numeric SRID queries in
ST::transformandST::setSRID(thanks @BezBIS #91) - Fixed
ST::buffer&ST:offsetCurve: Correctly renamedstyleMitreLeveltostyleMitreLimit
-
1.6.108 Aug 2024Release notes
Open source →Improved
- Only override attribute preparation functions on models instead of
performInsertorperformUpdateentirely (thanks @RomainMazB #89)
Fixed
- Fixed geometries not being passed to model events (fixes #87) (thanks @RomainMazB #89)
- Fixed not updating
Pointdimension when usingsetAltitude
New Contributors
- @tmgreensolutions made their first contribution in #92
- @RomainMazB made their first contribution in #88
Full Changelog: 1.6.0...1.6.1
Release notes
Open source →Improved
- Only override attribute preparation functions on models instead of
performInsertorperformUpdateentirely (thanks @RomainMazB #89)
Fixed
- Fixed geometries not being passed to model events (fixes #87) (thanks @RomainMazB #89)
- Only override attribute preparation functions on models instead of
-
1.6.017 Mar 2024Release notes
Open source →What's Changed
- chore(deps): Update dependencies & spatie/invade by @saibotk in #79
- chore: Laravel 11 support by @faytekin in #76
New Contributors
Full Changelog: 1.5.0...1.6.0
Release notes
Open source →Added
- Laravel 11.x support
Improved
- Updated
spatie/invadeto v2, works without reflection now 🥳
Fixed
- Fixed not updating
Pointdimension when usingsetAltitude
-
1.5.019 Jan 2024Release notes
Open source →Added
- Added
asparameter forstFromfunction - Aligned
stHavingwithstWhereto also accept string column and ST expressions, boxes and geometries as value
Fixed
- Fixed builder macro docblocks to use FQDN for an issue within laravel-ide-helper
- Fixed
ST_PROJECTfunction not being migrated to the GeometryType enum. - Fixed model attribute equality checks for geometries, reduces unnecessary database updates (thanks @adamczykpiotr)
- Added
-
1.4.001 Jul 2023Release notes
Open source →Improved
- Added Typing for Box2D and Box3D in GeoParam allowing Box objects as params in Magellan Expressions
- Added evaluation of parameters in stWhere in order to also allow magellan expressions in value and regular string, boxes or geometries in first parameter
-
1.3.028 Jun 2023Release notes
Open source →Added
- Added Missing Distance Relationships Functions (Fixes #46)
Fixed
- Fixed nullable handling in
TransformsGeojsonGeometrytrait (Fixes #37)
-
1.2.228 Mar 2023 -
1.2.128 Mar 2023Release notes
Open source →Fixed
- Fixed generation of invalid FeatureCollection in case of zero database rows (thanks @djfhe)
-
1.2.002 Mar 2023Release notes
Open source →Improved
- Added config for geodetic SRIDs (most of the time WGS84 is sufficient, but there are much more geodetic SRIDs than 4326)
Fixed
- Fixed sql syntax error when trying to create magellanGeography (fixes #27, thanks @tanabi)
- Fix getValue calls on Expressions in Laravel 10
-
1.1.007 Feb 2023Release notes
Open source →Added
- Laravel 10 support
- PHP 8.2 support
Improved
- Optional geometry type param for ST_Buffer enabling easier control about metric buffering
Fixed
- Typing bug when trying to use a Closure as Geoparam
-
1.0.205 Jan 2023Release notes
Open source →Fixed
- Fix some ST functions not being migrated to the GeometryType enum.
-
1.0.105 Jan 2023Release notes
Open source →Fixed
- Fix bindings being wrongly converted to SQL function statements, eg. in
query()->update()calls.
- Fix bindings being wrongly converted to SQL function statements, eg. in
-
1.0.004 Jan 2023