Download the PHP package jackardios/laravel-eloquent-spatial without Composer
On this page you can find all versions of the php package jackardios/laravel-eloquent-spatial. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download jackardios/laravel-eloquent-spatial
More information about jackardios/laravel-eloquent-spatial
Files in jackardios/laravel-eloquent-spatial
Package laravel-eloquent-spatial
Short Description Spatial library for Laravel
License MIT
Homepage https://github.com/jackardios/laravel-eloquent-spatial
Informations about the package laravel-eloquent-spatial
Laravel Eloquent Spatial
Laravel package for working with spatial data types and functions in Eloquent.
Supported Databases
- MySQL 5.7 / 8.x
- MariaDB 10.x
- PostgreSQL 12+ with PostGIS 3.4+
Requirements
- PHP 8.1+
- Laravel 10.x / 11.x / 12.x
Installation
Quick Start
1. Create a Migration
2. Set Up Your Model
3. Work with Spatial Data
Geometry Classes
All geometry classes support creating instances from various formats:
Available Geometry Types
| Class | Description |
|---|---|
Point |
Single coordinate (longitude, latitude) |
LineString |
Ordered sequence of Points |
Polygon |
Closed shape defined by LineStrings |
MultiPoint |
Collection of Points |
MultiLineString |
Collection of LineStrings |
MultiPolygon |
Collection of Polygons |
GeometryCollection |
Mixed collection of any geometry types |
BoundingBox |
Rectangular bounds with antimeridian support |
Coordinate Validation
The Point class validates coordinates automatically:
Spatial Query Scopes
The HasSpatial trait provides query scopes for spatial operations:
Distance Queries
Spatial Relationship Queries
BoundingBox
The BoundingBox class represents rectangular geographic bounds:
BoundingBox as Model Attribute
SRID Support
Spatial Reference Identifiers define coordinate systems:
Extending Geometry Classes
Using Macros
Custom Geometry Classes
API Reference
For complete API documentation, see API.md.
Upgrading
See UPGRADE.md for upgrade instructions from previous versions.
Development
License
MIT License. See LICENSE.md for details.
All versions of laravel-eloquent-spatial with dependencies
ext-json Version *
ext-pdo Version *
laravel/framework Version ^10.0|^11.0|^12.0
phayes/geophp Version ^1.2