PHP Classes

Laravel Nova PHP Google Maps Address Autocomplete: Generate address input field for Laravel Nova

Recommend this page to a friend!
  Info   View files Documentation   View files View files (14)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
Not yet rated by the usersTotal: 51 All time: 10,596 This week: 96Up
Version License PHP version Categories
nova-address-autocom 1.0The PHP License5HTML, PHP 5, Web services, Geography
Description 

Author

This package can generate address input field for Laravel Nova.

It is a service provider to be used in Laravel Nova administration panel that generate HTML and JavaScript to manage a form input field that will autocomplete addresses typed by the users using the Google Places API of Google Maps platform.

The package can restrict the completed places to specific countries. The map and address language is also configurable.

Picture of Naif Alshaye
  Performance   Level  
Innovation award
Innovation award
Nominee: 9x

 

Documentation

Nova Address AutoComplete Field

An address field that autocomplete the user input to show suggested addresses using Google Place service.

Installation

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

composer require naif/address_autocomplete

Configuration

Publish the package config file:

php artisan vendor:publish --provider="Naif\AddressAutocomplete\FieldServiceProvider"

Configuration will be published at [config/address_autocomplete.php].

Add the following keys to your .env and .env.example:

ADDRESS_AUTOCOMPLETE_API_KEY=

Optional: Set map and address language
ADDRESS_AUTOCOMPLETE_LANGUAGE=fr

_If you need a Google Maps API key, you can create an app and enable Places API and create credentials to get your API key https://console.developers.google.com._

Usage:

Add the below to Nova/User.php resource:


AddressAutocomplete::make('Address'),

//You can add a country or countries to autocomplete or leave empty for all.
          
// Specify a single country
AddressAutocomplete::make('Address')
          ->countries('US'),
                
// Specify multiple countries [array]
AddressAutocomplete::make('Address')
          ->countries(['US','AU']),

Package screenshot

Support:

naif@naif.io

https://www.linkedin.com/in/naif

License

The MIT License (MIT). Please see License File for more information.


  Files folder image Files  
File Role Description
Files folder imageconfig (1 file)
Files folder imagedist (1 directory)
Files folder imageresources (2 directories)
Files folder imagesrc (2 files)
Accessible without login Plain text file composer.json Data Auxiliary data
Accessible without login Plain text file mix-manifest.json Data Auxiliary data
Accessible without login Plain text file package.json Data Auxiliary data
Accessible without login Plain text file README.md Doc. Documentation
Accessible without login Plain text file webpack.mix.js Data Auxiliary data

 Version Control Unique User Downloads Download Rankings  
 100%
Total:51
This week:0
All time:10,596
This week:96Up