1. Go to this page and download the library: Download xabou/google-geocoding 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/ */
return [
/*
|--------------------------------------------------------------------------
| Application Key
|--------------------------------------------------------------------------
|
| Your application's API key. Make sure to get a Key before starting using
| Google Geocoding API.
|
*/
'api_key' => '',
/*
|--------------------------------------------------------------------------
| Google Maps Geocoding API URL
|--------------------------------------------------------------------------
|
| Here you san set the URL for the Google Maps Geocoding API. By default,
| HTTPS protocol has been selected.
|
*/
'request_url' => 'https://maps.googleapis.com/maps/api/geocode/',
/*
|--------------------------------------------------------------------------
| Response Output Format
|--------------------------------------------------------------------------
|
| Here you can configure the preferred output format of a Geocoding
| Request.
|
| Supported: "json", "xml"
|
*/
'output_format' => 'json',
];
php artisan vendor:publish --tag=geocoding-config
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.