/geocode

Primary LanguagePHPMIT LicenseMIT

geocode

Build Status Latest Stable Version Total Downloads Latest Unstable Version License

PHP Address Geocoding for laravel using Google API

Install

composer require nkootstra/geocode

Include Nkootstra\Geocode\GeocodeServiceProvider::class, in your config/app.php

Usage

use Nkootstra\Geocode\GeoCode as Geocode;

Route::get('/', function () {

	$address = '1600 Wigwam Pkwy, Henderson, NV 89074';

	$geocode = Geocode::getInformation($address);

	return view('welcome')->with(['geocode' => $geocode]);
});

Pull Latitude: $geocode['lat'] Pull Longitude: $geocode['lng']