Mainly because Typeahead Address Picker hasn't been updated in some time and Google Places now requires API keys.
This is an Yii2 wrapper for the Typeahead Address Picker JS plugin.
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.
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']);
?>