suggestion to add to documentation
jehadja opened this issue · 0 comments
jehadja commented
General Information
it will be helpful to add how to make locale result for the package i see a lot of question even some people make pull request etc..
so its better to make it clear its possible to achieve without code changing
code shall be as following
use Geocoder\Query\GeocodeQuery;
$geocoder = app('geocoder');
$provider = $geocoder->getProvider();
$geocoder = new \Geocoder\StatefulGeocoder($provider,'ar');
$results = $geocoder->geocode('London');
result :
AddressCollection {#1060 ▼
-locations: array:1 [▼
0 => GoogleAddress {#1062 ▼
-id: "ChIJdd4hrwug2EcRmSrV3Vo6llI"
-locationType: "APPROXIMATE"
-resultType: array:2 [▶]
-formattedAddress: "لندن، المملكة المتحدة"
-streetAddress: null
-intersection: null
-political: "المملكة المتحدة"
-colloquialArea: null
-ward: null
-neighborhood: null
-premise: null
-subpremise: null
-naturalFeature: null
-airport: null
-park: null
-pointOfInterest: null
-establishment: null
-subLocalityLevels: AdminLevelCollection {#1059 ▶}
-coordinates: Coordinates {#1067 ▶}
-bounds: Bounds {#1066 ▶}
-streetNumber: null
-streetName: null
-subLocality: null
-locality: "لندن"
-postalCode: null
-adminLevels: AdminLevelCollection {#1061 ▶}
-country: Country {#1049 ▶}
-timezone: null
-providedBy: "google_maps"
}
]
}