PHPackages                             malhal/laravel-geographical - 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. [Framework](/categories/framework)
4. /
5. malhal/laravel-geographical

ActiveLibrary[Framework](/categories/framework)

malhal/laravel-geographical
===========================

Easily add longitude and latitude columns to your records and use inherited functionality for calculating distances

1.0.8(1y ago)283375.6k—1.3%52[9 issues](https://github.com/malhal/Laravel-Geographical/issues)MITPHPPHP &gt;=5.6.4CI failing

Since Oct 1Pushed 1y ago11 watchersCompare

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

READMEChangelog (9)Dependencies (2)Versions (10)Used By (0)

Laravel Geographical
====================

[](#laravel-geographical)

Easily add longitude and latitude columns to your records and use inherited functionality for calculating distances.

First either update your database or add this to a migration for each model:

```
$table->double('longitude');
$table->double('latitude');
```

Finally, edit you model to use the Geographical Trait, as the example below:

```
