1. Go to this page and download the library: Download daavelar/laravel-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/ */
daavelar / laravel-geocode example snippets
'providers' => [
// Other service providers...
Daavelar\LaravelGeocode\LaravelGeoCodeServiceProvider::class,
],
use Daavelar\LaravelGeoCode\GeoCodeFacade as GeoCode;
$address = '1600 Amphitheatre Parkway, Mountain View, CA';
$result = GeoCode::fromAddress($address);
print_r($result);