定制 petrabarus/yii2-googleplacesautocomplete 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

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

GitHub 信息

  • Stars: 9
  • Watchers: 2
  • Forks: 11
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-02-12