PHP code example of snezhkoigor / geocoding

1. Go to this page and download the library: Download snezhkoigor/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/ */

    

snezhkoigor / geocoding example snippets


  // 'providers' => [
      Geocoding\Laravel\GeocodingServiceProvider::class,
  // ];
  

app('geocoding')->geocode((\Geocoding\Laravel\Models\Query\GeocodeQuery::create('Санкт-Петербург')));

app('geocoding')->suggest((\Geocoding\Laravel\Models\Query\SuggestQuery::create('перво')));


use Geocoding\Laravel\Providers\DaData;

return [
    /*
    |--------------------------------------------------------------------------
    | Providers
    |--------------------------------------------------------------------------
    |
    */
    'providers' => [
        DaData::class => [
            'token' => env('DADATA_TOKEN', ''),
            'proxy' => env('DADATA_PROXY_IP', null)
        ]
    ]
];
sh
php artisan vendor:publish --provider="Geocoding\Laravel\GeocodingServiceProvider" --tag="config"