PHP code example of sapioweb / geocode

1. Go to this page and download the library: Download sapioweb/geocode library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

sapioweb / geocode example snippets


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]);
});