yiibr/yii2-correios
最新稳定版本:2.0.4
Composer 安装命令:
composer require yiibr/yii2-correios
包简介
Locates an address in Brazil by postal code
关键字:
README 文档
README
This extension allows automatic completion and search Brazilian address.
Installation
Add to the require section of your composer.json file:
"yiibr/yii2-correios": "*"
Configuration
On your controller.
public function actions() { return [ ... 'addressSearch' => 'yiibr\correios\CepAction' ... ]; }
How to use
On your view file.
<?php use yiibr\correios\CepInput; ?> ... <?= CepInput::widget([ 'name' => 'cep', 'action' => ['addressSearch'], 'fields' => [ 'location' => 'location_input_id', 'district' => 'district_input_id', 'city' => 'city_input_id', 'state' => 'state_input_id' ], ]); ?>
// Example: <?= $form->field($model, 'cep',)->widget('yiibr\correios\CepInput', [ 'action' => ['addressSearch'], 'fields' => [ 'location' => 'address-location', 'district' => 'address-district', 'city' => 'address-city', 'state' => 'address-state', ], ]) ?> <?= $form->field($model, 'location')->textInput() ?> <?= $form->field($model, 'district')->textInput() ?> <?= $form->field($model, 'city')->textInput() ?> <?= $form->field($model, 'state')->textInput() ?>
统计信息
- 总下载量: 14.17k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 12
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: BSD
- 更新时间: 2014-04-07