You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Anytime you upgrade this package, please remember to clear your cache, to prevent incompatible cached responses when breaking changes are introduced (this should hopefully only be necessary in major versions):
40
-
```sh
41
-
php artisan cache:clear
42
-
```
43
-
44
-
### 1.x to 4.x
45
-
Update your composer.json file:
37
+
3.**Optional** I recommend adding the following lines to your `composer.json` file to prevent stale caches when upgrading or updating the package, both in your live and dev environments:
46
38
```json
47
-
"toin0u/geocoder-laravel": "^4.0",
39
+
"post-update-cmd": [
40
+
"@php artisan cache:clear",
41
+
],
42
+
"post-install-cmd": [
43
+
"@php artisan cache:clear",
44
+
]
48
45
```
49
46
50
-
The one change to keep in mind here is that the results returned from
51
-
`Geocoder for Laravel` are now using the Laravel-native Collections class
52
-
instead of returning an instance of `AddressCollection`. This should provide
53
-
greater versatility in manipulation of the results, and be inline with
54
-
expectations for working with Laravel. The existing `AddressCollection`
55
-
methods should map strait over to Laravel's `Collection` methods. But be sure
56
-
to double-check your results, if you have been using `count()`,
57
-
`first()`, `isEmpty()`, `slice()`, `has()`, `get()`, or `all()` on your results.
58
-
59
-
Also, `getProviders()` now returns a Laravel Collection instead of an array.
60
-
61
-
**Alert:** if you have been using the `getIterator()` method, it is no longer
62
-
needed. Simply iterate over your results as you would any other Laravel
63
-
collection.
64
-
65
-
**Deprecated:**
66
-
- the `all()` method on the geocoder is being deprecated in favor of using
67
-
`get()`, which will return a Laravel Collection. You can then run `all()`
68
-
on that. This method will be removed in version 5.0.0.
69
-
- the `getProvider()` method on the geocoder is being deprecated in favor of using
70
-
`getProviders()`, which will return a Laravel Collection. You can then run `first()`
71
-
on that to get the same result. This method will be removed in version 5.0.0.
72
-
73
-
**Added:** this version introduces a new way to create more complex queries:
74
-
- geocodeQuery()
75
-
- reverseQuery()
76
-
77
-
Please see the [Geocoder documentation](https://github.com/geocoder-php/Geocoder)
78
-
for more details.
79
-
80
-
### 0.x to 1.x
81
-
If you are upgrading from a pre-1.x version of this package, please keep the
82
-
following things in mind:
83
-
84
-
1. Update your composer.json file as follows:
85
-
86
-
```json
87
-
"toin0u/geocoder-laravel": "^1.0",
88
-
```
89
-
90
-
2. Remove your `config/geocoder.php` configuration file. (If you need to customize it, follow the configuration instructions below.)
91
-
3. Remove any Geocoder alias in the aliases section of your `config/app.php`. (This package auto-registers the aliases.)
92
-
4. Update the service provider entry in your `config/app.php` to read:
Anytime you upgrade this package, please remember to clear your cache, to prevent incompatible cached responses when breaking changes are introduced (this should hopefully only be necessary in major versions):
145
+
```sh
146
+
php artisan cache:clear
147
+
```
209
148
210
-
## Support
211
-
If you are experiencing difficulties, please please open an issue on GitHub:
149
+
### 1.x to 4.x
150
+
Update your composer.json file:
151
+
```json
152
+
"toin0u/geocoder-laravel": "^4.0",
153
+
```
154
+
155
+
The one change to keep in mind here is that the results returned from
156
+
`Geocoder for Laravel` are now using the Laravel-native Collections class
157
+
instead of returning an instance of `AddressCollection`. This should provide
158
+
greater versatility in manipulation of the results, and be inline with
159
+
expectations for working with Laravel. The existing `AddressCollection`
160
+
methods should map strait over to Laravel's `Collection` methods. But be sure
161
+
to double-check your results, if you have been using `count()`,
162
+
`first()`, `isEmpty()`, `slice()`, `has()`, `get()`, or `all()` on your results.
163
+
164
+
Also, `getProviders()` now returns a Laravel Collection instead of an array.
165
+
166
+
**Alert:** if you have been using the `getIterator()` method, it is no longer
167
+
needed. Simply iterate over your results as you would any other Laravel
168
+
collection.
169
+
170
+
**Deprecated:**
171
+
- the `all()` method on the geocoder is being deprecated in favor of using
172
+
`get()`, which will return a Laravel Collection. You can then run `all()`
173
+
on that. This method will be removed in version 5.0.0.
174
+
- the `getProvider()` method on the geocoder is being deprecated in favor of using
175
+
`getProviders()`, which will return a Laravel Collection. You can then run `first()`
176
+
on that to get the same result. This method will be removed in version 5.0.0.
177
+
178
+
**Added:** this version introduces a new way to create more complex queries:
179
+
- geocodeQuery()
180
+
- reverseQuery()
181
+
182
+
Please see the [Geocoder documentation](https://github.com/geocoder-php/Geocoder)
183
+
for more details.
184
+
185
+
### 0.x to 1.x
186
+
If you are upgrading from a pre-1.x version of this package, please keep the
187
+
following things in mind:
188
+
189
+
1. Update your composer.json file as follows:
190
+
191
+
```json
192
+
"toin0u/geocoder-laravel": "^1.0",
193
+
```
194
+
195
+
2. Remove your `config/geocoder.php` configuration file. (If you need to customize it, follow the configuration instructions below.)
196
+
3. Remove any Geocoder alias in the aliases section of your `config/app.php`. (This package auto-registers the aliases.)
197
+
4. Update the service provider entry in your `config/app.php` to read:
0 commit comments