定制 wbraganca/yii2-correios 二次开发

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

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

wbraganca/yii2-correios

最新稳定版本:1.0.0-alpha.2

Composer 安装命令:

composer require wbraganca/yii2-correios

包简介

Locates an address in Brazil by postal code

README 文档

README

Latest Version Software License Total Downloads

Install

Via Composer

$ composer require wbraganca/yii2-correios

or add

"wbraganca/yii2-correios": "dev-master"

to the require section of your composer.json file.

Usage

###Raw search.

<?php

use wbraganca\correios\AddressSearchByCep;

$obj = new AddressSearchByCep();
$result = $obj->search('22021-001');
/* OUTPUT
array(
    'location' => 'Avenida Atlântica - de 1662 a 2172 - lado pa'
    'district' => 'Copacabana'
    'city' => 'Rio de Janeiro'
    'state' => 'RJ'
    'cep' => '22021-001'
    'result' => 1
    'result_text' => 'Address found.'
);
*/

###On your controller.

public function actions()
{
    return [
        'searchAddress' => 'wbraganca\correios\CepAction'
    ];
}

http://example.com/index.php?r=your-controller/searchAddress&cep=22021-001

统计信息

  • 总下载量: 651
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: BSD-3-Clause
  • 更新时间: 2015-12-19