diff --git a/6.x/crud-fields.md b/6.x/crud-fields.md index b9a69023..468aa21b 100644 --- a/6.x/crud-fields.md +++ b/6.x/crud-fields.md @@ -1138,6 +1138,13 @@ CRUD::field([ // Address google Using Google Places API is dependent on using an API Key. Please [get an API key](https://console.cloud.google.com/apis/credentials) - you do have to configure billing, but you qualify for $200/mo free usage, which covers most use cases. Then copy-paste that key as your ```services.google_places.key``` value. +**IMPORTANT NOTE**: Your key needs access to the following APIS: +- Maps JavaScript API; +- Places API; +- Geocoding API. + +While developing you can use an "unrestricted key" (no restrictions for where the key is used), but for production you should use a separate key, and **MAKE SURE** you restrict the usage of that key to your own domain. + So inside your ```config/services.php``` please add the items below: ```php 'google_places' => [ @@ -1558,6 +1565,13 @@ Using Google Places API is dependent on using an API Key. Please [get an API key ], ``` +**IMPORTANT NOTE**: Your key needs access to the following APIS: +- Maps JavaScript API; +- Places API; +- Geocoding API. + +While developing you can use an "unrestricted key" (no restrictions for where the key is used), but for production you should use a separate key, and **MAKE SURE** you restrict the usage of that key to your own domain. + **How to save in multiple inputs?** There are cases where you rather save the information on separate inputs in the database. In that scenario you should use [Laravel mutators and accessors](https://laravel.com/docs/10.x/eloquent-mutators). Using the same field as previously shown (**field name is `location`**), and having `latitude`, `longitude`, `full_address` as the database columns, we can save and retrieve them separately too: diff --git a/7.x-dev/crud-fields.md b/7.x-dev/crud-fields.md index 3f33283f..b50778e2 100644 --- a/7.x-dev/crud-fields.md +++ b/7.x-dev/crud-fields.md @@ -1138,6 +1138,13 @@ CRUD::field([ // Address google Using Google Places API is dependent on using an API Key. Please [get an API key](https://console.cloud.google.com/apis/credentials) - you do have to configure billing, but you qualify for $200/mo free usage, which covers most use cases. Then copy-paste that key as your ```services.google_places.key``` value. +**IMPORTANT NOTE**: Your key needs access to the following APIS: +- Maps JavaScript API; +- Places API; +- Geocoding API. + +While developing you can use an "unrestricted key" (no restrictions for where the key is used), but for production you should use a separate key, and **MAKE SURE** you restrict the usage of that key to your own domain. + So inside your ```config/services.php``` please add the items below: ```php 'google_places' => [ @@ -1423,6 +1430,13 @@ Using Google Places API is dependent on using an API Key. Please [get an API key ], ``` +**IMPORTANT NOTE**: Your key needs access to the following APIS: +- Maps JavaScript API; +- Places API; +- Geocoding API. + +While developing you can use an "unrestricted key" (no restrictions for where the key is used), but for production you should use a separate key, and **MAKE SURE** you restrict the usage of that key to your own domain. + **How to save in multiple inputs?** There are cases where you rather save the information on separate inputs in the database. In that scenario you should use [Laravel mutators and accessors](https://laravel.com/docs/10.x/eloquent-mutators). Using the same field as previously shown (**field name is `location`**), and having `latitude`, `longitude`, `full_address` as the database columns, we can save and retrieve them separately too: