nevermnd/yii2-places

This package is abandoned and no longer maintained. No replacement package was suggested.

Yii2 typeahead google places autocomplete widget

v1.0.5 2017-01-10 13:29 UTC

This package is not auto-updated.

Last update: 2022-02-01 12:54:13 UTC


README

This extension is now deprecated, v1.0.5 is the last release!

Mainly because Typeahead Address Picker hasn't been updated in some time and Google Places now requires API keys.

Build Status

This is an Yii2 wrapper for the Typeahead Address Picker JS plugin.

Installation

The preferred way to install this extension is through composer.

Either run

$ composer require nevermnd/yii2-places:^1.0

or add

"nevermnd/yii2-places": "^1.0"

to the require section of your composer.json file.

Usage

With a model:

use nevermnd\places\PlacesAutocomplete;
<?php
echo $form->field($model, 'place')
          ->widget(PlacesAutocomplete::className());
?>

Without a model:

use nevermnd\places\PlacesAutocomplete;
<?php
echo PlacesAutocomplete::widget(['name' => 'place']);
?>