| Package Data | |
|---|---|
| Maintainer Username: | Latrell |
| Maintainer Contact: | i@latrell.me (Latrell Chan) |
| Package Create Date: | 2014-12-06 |
| Package Last Update: | 2015-03-27 |
| Language: | PHP |
| License: | MIT |
| Last Refreshed: | 2025-11-02 15:02:18 |
| Package Statistics | |
|---|---|
| Total Downloads: | 28,009 |
| Monthly Downloads: | 50 |
| Daily Downloads: | 0 |
| Total Stars: | 11 |
| Total Watchers: | 1 |
| Total Forks: | 6 |
| Total Open Issues: | 1 |
This package geohash for Laravel 5 support.
composer require latrell/geohash dev-master
Update your packages with composer update or install with composer install.
Find the providers key in config/app.php and register the Geohash Service Provider.
'providers' => [
// ...
'Latrell\Geohash\GeohashServiceProvider',
]
Find the aliases key in config/app.php.
'aliases' => [
// ...
'Geohash' => 'Latrell\Geohash\Facades\Geohash',
]
Encode a coordinate:
echo Geohash::encode(31.283131, 121.500831); // wtw3uyfjqw61
Decode a Geohash:
list($lat, $lng) = Geohash::decode('wtw3uyfjqw61');
echo $lat, ', ', $lng; // 31.283131, 121.500831