Downloads
Stars
Version
This field allows you to pick address using Google Places API by three ways:
You can install the package via composer:
composer require digitalcloud/nova-address-field
You need to provide the Google places API key, you can get one from https://console.developers.google.com
and then add the api key to your .env
file
GOOGLE_PLACES_API_KEY=############################
use DigitalCloud\AddressField\AddressField;
// ....
AddressField::make('Address'),
//You can enable lat and lng inputs:
GoogleAutocomplete::make('Address')
->withLatLng(),
//You can enable map picking address:
GoogleAutocomplete::make('Address')
->withMap(),
//You can set the init location and zoom for the map:
GoogleAutocomplete::make('Address')
->withMap()->initLocation('24.6', '46.7')->zoom(5),