8000 Add tojson method · geocoder-php/GeocoderLaravel@1140830 · GitHub
[go: up one dir, main page]

Skip to content

Commit 1140830

Browse files
committed
Add tojson method
Fixes #101
1 parent 792da3d commit 1140830

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

CHANGELOG.md

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

5+
## [4.0.21] - 3 Nov 2018
6+
### Added
7+
- `->toJson()` method when querying results.
8+
59
## [4.0.10] - 1 Jul 2018
610
### Changed
711
- service provider to register singleton and alias in `register()` method.

src/ProviderAndDumperAggregator.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,13 @@ public function get() : Collection
5151
return $this->results;
5252
}
5353

54+
public function toJson() : string
55+
{
56+
return $this
57+
->dump("geojson")
58+
->first();
59+
}
60+
5461
public function dump(string $dumper) : Collection
5562
{
5663
$dumperClasses = collect([

0 commit comments

Comments
 (0)
0