petrabarus/yii2-googleplacesautocomplete
Composer 安装命令:
composer require petrabarus/yii2-googleplacesautocomplete
包简介
Google Places Auto Complete input widget for Yii2
README 文档
README
Google Places Auto Complete widget for Yii2
##Installation
Add below to your composer.json file
"repositories": [
{
"type": "vcs",
"url": "https://github.com/petrabarus/yii2-googleplacesautocomplete"
}
],
"requires": {
"petrabarus/yii2-googleplacesautocomplete": "*"
}
##Usage
Using widget and model.
use PetraBarus\Yii2\GooglePlacesAutoComplete\GooglePlacesAutoComplete;
echo GooglePlacesAutoComplete::widget([
'model' => $model,
'attribute' => 'location'
]);
Using widget for custom field name and value.
use PetraBarus\Yii2\GooglePlacesAutoComplete\GooglePlacesAutoComplete;
echo GooglePlacesAutoComplete::widget([
'name' => 'place'
'value' => 'Jakarta'
]);
Using active form.
use yii\bootstrap\ActiveForm;
use PetraBarus\Yii2\GooglePlacesAutoComplete\GooglePlacesAutoComplete;
echo $form = ActiveForm::begin();
echo $form->field($model, 'location')->widget(GooglePlacesAutoComplete::className());
统计信息
- 总下载量: 6.41k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 10
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2015-02-12