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  
Name: Naif Alshaye <contact>
Classes: 24 packages by
Country: Saudi Arabia Saudi Arabia
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

  Files folder image Files  /  config  
File Role Description
  Accessible without login Plain text file address_autocomplete.php Conf. Configuration script

  Files folder image Files  /  dist  
File Role Description
Files folder imagejs (1 file)

  Files folder image Files  /  dist  /  js  
File Role Description
  Accessible without login Plain text file field.js Data Auxiliary data

  Files folder image Files  /  resources  
File Role Description
Files folder imagejs (1 file, 1 directory)
Files folder imagesass (1 file)

  Files folder image Files  /  resources  /  js  
File Role Description
Files folder imagecomponents (3 files)
  Accessible without login Plain text file field.js Data Auxiliary data

  Files folder image Files  /  resources  /  js  /  components  
File Role Description
  Accessible without login Plain text file DetailField.vue Data Auxiliary data
  Accessible without login Plain text file FormField.vue Data Auxiliary data
  Accessible without login Plain text file IndexField.vue Data Auxiliary data

  Files folder image Files  /  resources  /  sass  
File Role Description
  Accessible without login Plain text file field.scss Data Auxiliary data

  Files folder image Files  /  src  
File Role Description
  Plain text file AddressAutocomplete.php Class Class source
  Plain text file FieldServiceProvider.php Class Class source

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