PHPackages                             apptimists/laravel-spatial - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Database &amp; ORM](/categories/database)
4. /
5. apptimists/laravel-spatial

ActiveLibrary[Database &amp; ORM](/categories/database)

apptimists/laravel-spatial
==========================

Spatial data types extension for Laravel.

41914[3 PRs](https://github.com/apptimists/laravel-spatial/pulls)PHP

Since Nov 15Pushed 7y ago2 watchersCompare

[ Source](https://github.com/apptimists/laravel-spatial)[ Packagist](https://packagist.org/packages/apptimists/laravel-spatial)[ RSS](/packages/apptimists-laravel-spatial/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Laravel Spatial extension
=========================

[](#laravel-spatial-extension)

This package is fully untested, undocumented and unstable and is a combination of the two great packages:

- [Laravel PostGIS extension](https://github.com/njbarrett/laravel-postgis)
- [Laravel MySQL spatial extension](https://github.com/grimzy/laravel-mysql-spatial)

Installation
------------

[](#installation)

Installation made super-easy with [composer](https://getcomposer.org):

```
composer require apptimists/laravel-spatial

```

Also add the `LaravelSpatial\SpatialServiceProvider::class` to your `config/app.php`.

Requirements
------------

[](#requirements)

Works with [PostgreSQL](https://www.postgresql.org) installed [PostGIS](http://postgis.net) extension and [MySQL](http://mysql.com) at least version 5.6.

If you try using it on a shared host which is not fulfilling those requirements, change your provider.

Usage
-----

[](#usage)

We use the [GeoJson PHP Library](http://jmikola.github.io/geojson/) for describing spatial fields as GeoJSON object, e.g.:

```
use GeoJSON\Geometry\Point;

...

$eloquent = new MyModel();
$eloquent->location = new Point([49.7, 6.9]);

...

$eloquent->save();

```

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/aa6dc053ec78f8808c31bb1911dbea522fd8777f975a7692b8dc39d7de64c07f?d=identicon)[johannesberdin](/maintainers/johannesberdin)

---

Tags

geojsonlaravellaravel-5-packagemysqlphppostgisspatial

### Embed Badge

![Health badge](/badges/apptimists-laravel-spatial/health.svg)

```
[![Health](https://phpackages.com/badges/apptimists-laravel-spatial/health.svg)](https://phpackages.com/packages/apptimists-laravel-spatial)
```

###  Alternatives

[doctrine/orm

Object-Relational-Mapper for PHP

10.2k285.3M6.2k](/packages/doctrine-orm)[jdorn/sql-formatter

a PHP SQL highlighting library

3.9k115.1M102](/packages/jdorn-sql-formatter)[illuminate/database

The Illuminate Database package.

2.8k52.4M9.3k](/packages/illuminate-database)[mongodb/mongodb

MongoDB driver library

1.6k64.0M540](/packages/mongodb-mongodb)[ramsey/uuid-doctrine

Use ramsey/uuid as a Doctrine field type.

90340.3M208](/packages/ramsey-uuid-doctrine)[reliese/laravel

Reliese Components for Laravel Framework code generation.

1.7k3.4M16](/packages/reliese-laravel)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
