@@ -29,6 +29,35 @@ This package allows you to use [**Geocoder**](http://geocoder-php.org/Geocoder/)
29
29
// ];
30
30
```
31
31
32
+ ## Upgrading
33
+ If you are upgrading from a pre-1.x version of this package, please keep the
34
+ following things in mind:
35
+
36
+ 1 . Update your composer.json file as follows:
37
+ ``` json
38
+ "toin0u/geocoder-laravel" : " ^1.0" ,
39
+ ```
40
+
41
+ 2 . Remove your ` config/geocoder.php ` configuration file. (If you need to
42
+ customize it, follow the configuration instructions below.)
43
+ 3 . Update the service provider entry in your ` config/app.php ` to read:
44
+ ``` php
45
+ Geocoder\Laravel\Providers\GeocoderService::class,
46
+ ```
47
+ Also make sure you remove any Geocoder alias in the aliases section of this
48
+ file. (This package auto-registers the aliases.)
49
+ 3 . If you are using the facade in your code, update the ` use ` statements to the
50
+ following:
51
+ ``` php
52
+ use use Geocoder\Laravel\Facades\Geocoder;
53
+ ```
54
+
55
+ Alternatively you can replace the facades ` Geocoder:: ` (and remove the corresponding ` use `
56
+ statements) with ` app('geocoder')-> ` .
57
+ 4 . Update your query statements to use ` ->get() ` (to retrieve a collection of
58
+ GeoCoder objects) or ` ->all() ` (to retrieve an array of arrays), then iterate
59
+ to process each result.
60
+
32
61
## Configuration
33
62
Pay special attention to the language and region values if you are using them.
34
63
For example, the GoogleMaps provider uses TLDs for region values, and the
0 commit comments