PHPackages                             enflow/laravel-address - 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. enflow/laravel-address

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

enflow/laravel-address
======================

Address autocomplete with support for multiple drivers

3.2.0(1y ago)25.9k↓33.3%2[1 PRs](https://github.com/enflow/laravel-address/pulls)MITPHPPHP ^8.3CI failing

Since Aug 26Pushed 1y ago2 watchersCompare

[ Source](https://github.com/enflow/laravel-address)[ Packagist](https://packagist.org/packages/enflow/laravel-address)[ Fund](https://enflow.nl/contact)[ RSS](/packages/enflow-laravel-address/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (8)Dependencies (8)Versions (14)Used By (0)

Address autocomplete
====================

[](#address-autocomplete)

[![Latest Version on Packagist](https://camo.githubusercontent.com/e74da6a000071ba22974769fc0378370ee234446f665a67bf84c39cf81ef4d63/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f656e666c6f772f6c61726176656c2d616464726573732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/enflow/laravel-address)[![GitHub Workflow Status](https://github.com/enflow-nl/laravel-address/workflows/run-tests/badge.svg)](https://github.com/enflow-nl/laravel-address/workflows/run-tests/badge.svg)[![Total Downloads](https://camo.githubusercontent.com/12bbce89b1dada521d9f060f4d3807032dad74276ffd248ec81914113b006769/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f656e666c6f772f6c61726176656c2d616464726573732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/enflow/laravel-address)

The `enflow/laravel-address` package provides a opinionated way on how to implement address fields with autocomplete.

Usage
-----

[](#usage)

#### Step 1 - Install the package

[](#step-1---install-the-package)

You can install the package via composer:

```
composer require enflow/laravel-address
```

#### Step 2 - Config

[](#step-2---config)

You must publish the config to set the driver you which to use.

Pushing the config file:

```
php artisan vendor:publish --provider="Enflow\Address\AddressServiceProvider" --tag="config"
```

You must specify your driver choice. We provide a driver for HERE out of the box. See the 'Driver' section how to obtain a API key.

#### Step 3 - Migration

[](#step-3---migration)

Pushing the migration file:

```
php artisan vendor:publish --provider="Enflow\Address\AddressServiceProvider" --tag="migrations"
```

#### Step 4 - Prepare your model

[](#step-4---prepare-your-model)

The `Address` model is provided free to use, and you are able to configure it just like a normal Eloquent relationship:

##### Migration

[](#migration)

```
Schema::table('companies', function (Blueprint $table) {
    // ...
    $table->foreignId('address_id')->constrained();
});
```

##### Model

[](#model)

```
