mrssoft/yii2-dadata
Composer 安装命令:
composer require mrssoft/yii2-dadata
包简介
Components for working with Dadata
README 文档
README
Components for working with Dadata
Installation
The preferred way to install this extension is through composer. Either run
php composer.phar require --prefer-dist mrssoft/yii2-dadata "*"
or add
"mrssoft/yii2-dadata": "*"
to the require section of your composer.json file.
Usage
echo DaDataInputWidget::widget([ 'name' => 'name', 'options' => [ 'class' => 'form-control', 'placeholder' => 'you placeholder' ], 'clientOptions' => [ 'token' => 'you token', 'count' => 5, 'type' => DaDataInputWidget::TYPE_PARTY, ], 'clientEvents' => [ 'onSelect' => new \yii\web\JsExpression('function (suggestion) { console.log(suggestion); }') ] ]);
$ipLocate = new DaDataIpLocate(['token' => '...']); $response = $ipLocate->address(); //or $response = $ipLocate->address($ip);
统计信息
- 总下载量: 47
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 5
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2018-05-08