From 1761cb462b528d0c94bc15c9ef5747ce8ae2d114 Mon Sep 17 00:00:00 2001 From: Adrien Leloup Date: Mon, 4 May 2020 16:32:00 +0200 Subject: [PATCH] Added storage example --- README.md | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/README.md b/README.md index 5015337..80085c2 100644 --- a/README.md +++ b/README.md @@ -35,6 +35,24 @@ public function fields(Request $request) } ``` +## Storage +The field stores the JSON data sent back by Algolia (minus a few unneeded sub-objects). This gives you a lot of information on the selected place/address. Here is an example: + +```json +{ + "name": "Bruxelles", + "type": "city", + "query": "Bruxelles", + "value": "Bruxelles, Région de Bruxelles-Capitale - Brussels Hoofdstedelijk Gewest, Belgique", + "county": "Bruxelles-Capitale", + "latlng": {"lat": 50.8466, "lng": 4.3517}, + "country": "Belgique", + "postcode": "1000", + "countryCode": "be", + "administrative": "Région de Bruxelles-Capitale - Brussels Hoofdstedelijk Gewest" +} +``` + ## Configuration By default, you should reference your Google Maps API key in your `.env` file: