承接 shivella/postcode-bundle 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

shivella/postcode-bundle

Composer 安装命令:

composer require shivella/postcode-bundle

包简介

Symfony Postcode bundle

README 文档

README

This bundle can be useed to fetch Address details from zipcode with number. An account at Apiwise is required. For more information please take a look at: https://www.postcodeapi.nu

Build Status Latest Stable Version License Total Downloads Coverage Status Scrutinizer Code Quality

Installation

Installation is a quick 4 step process:

  1. Download postcode-bundle using composer
  2. Enable the Bundle in AppKernel.php
  3. Configure Apiwise credentials
  4. Add routes

Step 1: Download postcode-bundle using composer

Add UsoftPostcodeBundle by running the command:

$ composer require shivella/postcode-bundle

Step 2: Enable the Bundle in AppKernel.php

<?php
// app/AppKernel.php

public function registerBundles()
{
    $bundles = array(
        // ...
        new Usoft\PostcodeBundle\UsoftPostcodeBundle(),
    );
}

Step 3: Configure Apiwise credentials

# app/config/config.yml

# Apiwise Postcode API
usoft_postcode:
    apiwise:
        key: secret_api_wise_key

Step 4. Add routes

# app/config/routing.yml

postcode:
    resource: "@UsoftPostcodeBundle/Resources/config/routing.yml"
    prefix:   /

Usage Services

$address = $this->get('usoft.postcode.client')->getAddress('1012JS', 1);
	
$address->getStreet();       // Dam
$address->getCity();         // Amsterdam
$address->getMunicipality(); // Amsterdam
$address->getProvince();     // Noord-Holland
$address->getNumber();       // 1
$address->getZipcode();      // 1012JS
$address->getGeoLocation();  // array('latitude' => 52.3732926, 'longitude' => 4.8937176)

Usage from API

Or try the API response:

http://127.0.0.1:8000/api/postcode?postcode=2011WD&nummer=2

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2016-11-23

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固