|
1 | 1 | <?php
|
2 | 2 |
|
3 |
| -/** |
4 |
| - * This file is part of the GeocoderLaravel library. |
5 |
| - * For the full copyright and license information, please view the LICENSE |
6 |
| - * file that was distributed with this source code. |
7 |
| - */ |
8 |
| - |
9 | 3 | use Geocoder\Provider\Chain\Chain;
|
10 | 4 | use Geocoder\Provider\GeoPlugin\GeoPlugin;
|
11 | 5 | use Geocoder\Provider\GoogleMaps\GoogleMaps;
|
12 | 6 | use Http\Client\Curl\Client;
|
13 | 7 |
|
14 | 8 | return [
|
| 9 | + |
| 10 | + /* |
| 11 | + |-------------------------------------------------------------------------- |
| 12 | + | Cache Duration |
| 13 | + |-------------------------------------------------------------------------- |
| 14 | + | |
| 15 | + | Specify the cache duration in seconds. The default approximates a forever |
| 16 | + | cache, but there are certain issues with Laravel's forever caching |
| 17 | + | methods that prevent us from using them in this project. |
| 18 | + | |
| 19 | + | Default: 9999999 (integer) |
| 20 | + | |
| 21 | + */ |
15 | 22 | 'cache-duration' => 9999999,
|
| 23 | + |
| 24 | + /* |
| 25 | + |-------------------------------------------------------------------------- |
| 26 | + | Providers |
| 27 | + |-------------------------------------------------------------------------- |
| 28 | + | |
| 29 | + | Here you may specify any number of providers that should be used to |
| 30 | + | perform geocaching operations. The `chain` provider is special, |
| 31 | + | in that it can contain multiple providers that will be run in |
| 32 | + | the sequence listed, should the previous provider fail. By |
| 33 | + | default the first provider listed will be used, but you |
| 34 | + | can explicitly call subsequently listed providers by |
| 35 | + | alias: `app('geocoder')->using('google_maps')`. |
| 36 | + | |
| 37 | + | Please consult the official Geocoder documentation for more info. |
| 38 | + | https://github.com/geocoder-php/Geocoder#providers |
| 39 | + | |
| 40 | + */ |
16 | 41 | 'providers' => [
|
17 | 42 | Chain::class => [
|
18 | 43 | GoogleMaps::class => [
|
19 |
| - 'en-US', |
| 44 | + env('GOOGLE_MAPS_LOCALE', 'en-US'), |
20 | 45 | env('GOOGLE_MAPS_API_KEY'),
|
21 | 46 | ],
|
22 | 47 | GeoPlugin::class => [],
|
23 | 48 | ],
|
24 | 49 | ],
|
| 50 | + |
| 51 | + /* |
| 52 | + |-------------------------------------------------------------------------- |
| 53 | + | Adapter |
| 54 | + |-------------------------------------------------------------------------- |
| 55 | + | |
| 56 | + | You can specify which PSR-7-compliant HTTP adapter you would like to use. |
| 57 | + | There are multiple options at your disposal: CURL, Guzzle, and others. |
| 58 | + | |
| 59 | + | Please consult the official Geocoder documentation for more info. |
| 60 | + | https://github.com/geocoder-php/Geocoder#usage |
| 61 | + | |
| 62 | + | Default: Client::class (FQCN for CURL adapter) |
| 63 | + | |
| 64 | + */ |
25 | 65 | 'adapter' => Client::class,
|
| 66 | + |
26 | 67 | ];
|
0 commit comments