PHPackages                             emilianotisato/nova-google-autocomplete-field - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. emilianotisato/nova-google-autocomplete-field

AbandonedArchivedLibrary[Utility &amp; Helpers](/categories/utility)

emilianotisato/nova-google-autocomplete-field
=============================================

This Nova Package it's a Field that allows you to Autocomplete addresses with Google Place API and get the full metadata (lat and long, etc).

0.8.0(5y ago)20165.1k↓27.6%16[4 issues](https://github.com/emilianotisato/nova-google-autocomplete-field/issues)[2 PRs](https://github.com/emilianotisato/nova-google-autocomplete-field/pulls)MITVuePHP &gt;=7.1.0

Since Oct 3Pushed 2y ago2 watchersCompare

[ Source](https://github.com/emilianotisato/nova-google-autocomplete-field)[ Packagist](https://packagist.org/packages/emilianotisato/nova-google-autocomplete-field)[ RSS](/packages/emilianotisato-nova-google-autocomplete-field/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (12)Used By (0)

Nova Google AutoComplete Field Package
======================================

[](#nova-google-autocomplete-field-package)

This field allows you to work with Google Places API to autocomplete on user input and get the full real address with all the metadata (like latitude and longitude).

Installation
------------

[](#installation)

You can install the package in to a Laravel app that uses Nova via composer:

```
composer require emilianotisato/nova-google-autocomplete-field
```

Now publish config and localization files:

```
php artisan vendor:publish --provider="EmilianoTisato\GoogleAutocomplete\FieldServiceProvider"
```

Create an app and enable Places API and create credentials to get your API key

Add the below to your `.env` file

```
ADDRESS_AUTOCOMPLETE_API_KEY=############################
```

Usage
-----

[](#usage)

Add the use declaration to your resource and use the fields:

```
use EmilianoTisato\GoogleAutocomplete\GoogleAutocomplete;
// ....

GoogleAutocomplete::make('Address'),

//You can add a country or countries to autocomplete or leave empty for all.

// Specify a single country
GoogleAutocomplete::make('Address')
          ->countries('US'),

// Specify multiple countries [array]
GoogleAutocomplete::make('Address')
          ->countries(['US','AU]),
```

You can access other parameter like `latitude, longitude, street_number, route, locality, administrative_area_level_1, country, postal_code`, along with everything available in the - every field present in the [PlaceResult object](https://developers.google.com/maps/documentation/javascript/reference/#PlaceResult)

```
use EmilianoTisato\GoogleAutocomplete\AddressMetadata;
use EmilianoTisato\GoogleAutocomplete\GoogleAutocomplete;

// Now this address field will search and store the address as a string, but also made available the values in the withValues array
GoogleAutocomplete::make('Address')->withValues(['latitude', 'longitude']),

// And you can store the values by autocomplete like this
AddressMetadata::make('lat')->fromValue('latitude'),
AddressMetadata::make('long')->fromValue('longitude'),

// You can disable the field so the user can't edit the metadata
AddressMetadata::make('long')->fromValue('longitude')->disabled(),

// Or you can make the field invisible in the form but collect the data anyways
AddressMetadata::make('long')->fromValue('longitude')->invisible(),
```

### Combine Values

[](#combine-values)

If you want to concatenate certain elements of the geocoded object that is returned by Google, using `{{` and `}}`, wrap the key like you would above; like so:

```
use EmilianoTisato\GoogleAutocomplete\AddressMetadata;
use EmilianoTisato\GoogleAutocomplete\GoogleAutocomplete;

GoogleAutocomplete::make('Address')->withValues(['latitude', 'longitude']),

AddressMetadata::make('coordinates')->fromValue('{{latitude}}, {{longitude}}'),
```

So the value that would be rendered within the coordinates input would be something like:

```
39.3315476, -94.9363912

```

### Define Short/Long Value

[](#define-shortlong-value)

If you would like to use the **long\_name** version of the geocoded object (Kansas versus KS), you can define the `GoogleAutocomplete` field values with dot notation followed with the name version you want to use; like so:

```
use EmilianoTisato\GoogleAutocomplete\GoogleAutocomplete;

GoogleAutocomplete::make('Address')
    ->withValues([
        'route.short_name',
        'administrative_area_level_1.long_name',
    ]),
```

Which would return:

**route:** W 143rd St

**administrative\_area\_level\_1:** Kansas

You can change the type of places that are returned by the autocomplete using the placeType() method. You can use any of the values listed at [https://developers.google.com/places/supported\_types#table3](https://developers.google.com/places/supported_types#table3)

```
use EmilianoTisato\GoogleAutocomplete\AddressMetadata;
use EmilianoTisato\GoogleAutocomplete\GoogleAutocomplete;

// This autocomplete field will return results that match a business name instead of address.
// All the same address data is still stored.
GoogleAutocomplete::make('Address')->placeType('establishment');
```

Localization
------------

[](#localization)

If you want this package in your language, just create a json lang file in your `resources/lang/vendor/google-autocomplete` folder. Example

```
resources/lang/vendor/google-autocomplete/es.json

```

###  Health Score

36

—

LowBetter than 82% of packages

Maintenance16

Infrequent updates — may be unmaintained

Popularity44

Moderate usage in the ecosystem

Community19

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 70.3% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~90 days

Recently: every ~222 days

Total

11

Last Release

1879d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/071080ffc3e6211f7087871e646e589a200ddbf7ca600bc5c45edc6257846016?d=identicon)[emilianotisato](/maintainers/emilianotisato)

---

Top Contributors

[![emilianotisato](https://avatars.githubusercontent.com/u/18596215?v=4)](https://github.com/emilianotisato "emilianotisato (26 commits)")[![nickpoulos](https://avatars.githubusercontent.com/u/3959529?v=4)](https://github.com/nickpoulos "nickpoulos (3 commits)")[![chrisbjr](https://avatars.githubusercontent.com/u/571279?v=4)](https://github.com/chrisbjr "chrisbjr (2 commits)")[![Skullbock](https://avatars.githubusercontent.com/u/1104083?v=4)](https://github.com/Skullbock "Skullbock (2 commits)")[![swilla](https://avatars.githubusercontent.com/u/304159?v=4)](https://github.com/swilla "swilla (1 commits)")[![bernhardh](https://avatars.githubusercontent.com/u/642292?v=4)](https://github.com/bernhardh "bernhardh (1 commits)")[![ibrahim-mubarak](https://avatars.githubusercontent.com/u/47777720?v=4)](https://github.com/ibrahim-mubarak "ibrahim-mubarak (1 commits)")[![anotherfrontendguy](https://avatars.githubusercontent.com/u/4764281?v=4)](https://github.com/anotherfrontendguy "anotherfrontendguy (1 commits)")

---

Tags

laravelfieldnovaGoogle Places Apiaddress autocomplete

### Embed Badge

![Health badge](/badges/emilianotisato-nova-google-autocomplete-field/health.svg)

```
[![Health](https://phpackages.com/badges/emilianotisato-nova-google-autocomplete-field/health.svg)](https://phpackages.com/packages/emilianotisato-nova-google-autocomplete-field)
```

###  Alternatives

[timothyasp/nova-color-field

A Laravel Nova Color Picker field.

781.6M5](/packages/timothyasp-nova-color-field)[alexwenzel/nova-dependency-container

A Laravel Nova 4 form container for grouping fields that depend on other field values.

461.0M2](/packages/alexwenzel-nova-dependency-container)[simplesquid/nova-enum-field

A Laravel Nova field to add enums to resources.

52391.9k2](/packages/simplesquid-nova-enum-field)[outhebox/nova-hidden-field

A Laravel Nova Hidden field.

33562.2k1](/packages/outhebox-nova-hidden-field)[sietse85/nova-button

(Nova 4+) A Laravel Nova package for adding buttons to your resources.

37347.3k](/packages/sietse85-nova-button)[inspheric/nova-defaultable

Default values for Nova fields when creating resources and running resource actions.

51174.8k1](/packages/inspheric-nova-defaultable)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
