Skip to content

Commit 1706fd4

Browse files
committed
Update documentation
1 parent f1509e0 commit 1706fd4

File tree

2 files changed

+87
-17
lines changed

2 files changed

+87
-17
lines changed

CHANGELOG.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,21 @@
22
All notable changes to this project will be documented in this file.
33
This project adheres to [Semantic Versioning](http://semver.org/).
44

5+
## [4.0.5] - 14 Jan 2018
6+
### Fixed
7+
- loading of GeoIP2 provider from within Chain provider.
8+
9+
### Changed
10+
- unit testing to use Orchstral Testbench.
11+
12+
## [4.0.4] - 27 Dec 2017
13+
### Added
14+
- environment variable configuration option in default config to set Google Maps Locale.
15+
- documentation comments in configuration file.
16+
17+
### Changed
18+
- composer dependency version constraints for Laravel to be within a specific range, instead of open-ended.
19+
520
## [4.0.3] - 27 Oct 2017
621
### Fixed
722
- cache duration to work on 32-bit systems.

README.md

Lines changed: 72 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -69,35 +69,90 @@ By default, the configuration specifies a Chain provider, containing the
6969
config file is kept lean with only those two providers.
7070

7171
However, you are free to add or remove providers as needed, both inside the
72-
Chain provider, as well as along-side it. The following is an example config
73-
with additional providers we use for testing:
72+
Chain provider, as well as along-side it. The following is the default
73+
configuration provided by the package:
7474
```php
75-
use Http\Client\Curl\Client;
76-
use Geocoder\Provider\BingMaps\BingMaps;
7775
use Geocoder\Provider\Chain\Chain;
78-
use Geocoder\Provider\FreeGeoIp\FreeGeoIp;
76+
use Geocoder\Provider\GeoPlugin\GeoPlugin;
7977
use Geocoder\Provider\GoogleMaps\GoogleMaps;
78+
use Http\Client\Curl\Client;
8079

8180
return [
82-
'cache-duration' => 999999999,
81+
82+
/*
83+
|--------------------------------------------------------------------------
84+
| Cache Duration
85+
|--------------------------------------------------------------------------
86+
|
87+
| Specify the cache duration in seconds. The default approximates a forever
88+
| cache, but there are certain issues with Laravel's forever caching
89+
| methods that prevent us from using them in this project.
90+
|
91+
| Default: 9999999 (integer)
92+
|
93+
*/
94+
'cache-duration' => 9999999,
95+
96+
/*
97+
|--------------------------------------------------------------------------
98+
| Providers
99+
|--------------------------------------------------------------------------
100+
|
101+
| Here you may specify any number of providers that should be used to
102+
| perform geocaching operations. The `chain` provider is special,
103+
| in that it can contain multiple providers that will be run in
104+
| the sequence listed, should the previous provider fail. By
105+
| default the first provider listed will be used, but you
106+
| can explicitly call subsequently listed providers by
107+
| alias: `app('geocoder')->using('google_maps')`.
108+
|
109+
| Please consult the official Geocoder documentation for more info.
110+
| https://github.com/geocoder-php/Geocoder#providers
111+
|
112+
*/
83113
'providers' => [
84114
Chain::class => [
85115
GoogleMaps::class => [
86-
'en-US',
116+
env('GOOGLE_MAPS_LOCALE', 'en-US'),
87117
env('GOOGLE_MAPS_API_KEY'),
88118
],
89-
FreeGeoIp::class => [],
90-
],
91-
BingMaps::class => [
92-
'en-US',
93-
env('BING_MAPS_API_KEY'),
94-
],
95-
GoogleMaps::class => [
96-
'us',
97-
env('GOOGLE_MAPS_API_KEY'),
119+
GeoPlugin::class => [],
98120
],
99121
],
122+
123+
/*
124+
|--------------------------------------------------------------------------
125+
| Adapter
126+
|--------------------------------------------------------------------------
127+
|
128+
| You can specify which PSR-7-compliant HTTP adapter you would like to use.
129+
| There are multiple options at your disposal: CURL, Guzzle, and others.
130+
|
131+
| Please consult the official Geocoder documentation for more info.
132+
| https://github.com/geocoder-php/Geocoder#usage
133+
|
134+
| Default: Client::class (FQCN for CURL adapter)
135+
|
136+
*/
100137
'adapter' => Client::class,
138+
139+
/*
140+
|--------------------------------------------------------------------------
141+
| Reader
142+
|--------------------------------------------------------------------------
143+
|
144+
| You can specify a reader for specific providers, like GeoIp2, which
145+
| connect to a local file-database. The reader should be set to an
146+
| instance of the required reader class.
147+
|
148+
| Please consult the official Geocoder documentation for more info.
149+
| https://github.com/geocoder-php/geoip2-provider
150+
|
151+
| Default: null
152+
|
153+
*/
154+
'reader' => null,
155+
101156
];
102157
```
103158

@@ -216,7 +271,7 @@ If you are upgrading from a pre-1.x version of this package, please keep the
216271
- Clear cache: `php artisan cache:clear`.
217272
- If you are still experiencing difficulties, please please open an issue on GitHub:
218273
https://github.com/geocoder-php/GeocoderLaravel/issues.
219-
274+
220275
## Changelog
221276
https://github.com/geocoder-php/GeocoderLaravel/blob/master/CHANGELOG.md
222277

0 commit comments

Comments
 (0)