sapioweb / geocode
PHP geocoding for laravel 5 & 5.1 using Google API
Installs: 2 362
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 3
Forks: 1
Open Issues: 0
Requires
- php: >=5.5.0
Requires (Dev)
- mockery/mockery: 0.9.*
- phpunit/phpunit: 4.7.*
This package is not auto-updated.
Last update: 2024-11-09 19:31:41 UTC
README
PHP Address Geocoding for laravel using Google API
Install
composer require sapioweb/geocode
Include Sapioweb\Geocode\GeocodeServiceProvider::class,
in your config/app.php
Usage
use Sapioweb\Geocode\GeoCode; Route::get('/', function () { $geocode = new Geocode; $address = '1600 Wigwam Pkwy, Henderson, NV 89074'; $geocode = $geocode->getCoordinates($address); return view('welcome')->with(['geocode' => $geocode]); });
Pull Latitude: $geocode['geometry']['location']['lat']
Pull Longitude: $geocode['geometry']['location']['lng']
License
This software is open-sourced software licensed under the MIT license. For questions please email andreas@sapioweb.com or info@sapioweb.com or visit Sapioweb.com to learn more and get in contact