定制 tjenestetorget/norwegian-zip-codes 二次开发

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

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

tjenestetorget/norwegian-zip-codes

最新稳定版本:1.2

Composer 安装命令:

composer require tjenestetorget/norwegian-zip-codes

包简介

Laravel models for Norwegian zip codes, municipalities and counties. Includes an artisan command to update data from the official authority.

README 文档

README

What?

This package contains models, migrations and commands to automatically setup and update the administrative hierarchy of zip codes, municipalities and counties in Norway.

How

Install the package

composer require "tjenestetorget/norwegian-zip-codes"

Add service provider
Add NorwegianZipCodes\Providers\NorwegianZipCodesServiceProvider in config/app.php to the 'providers' array

Copy migrations to your migrations folder

php artisan vendor:publish --provider="NorwegianZipCodes\Providers\NorwegianZipCodesServiceProvider"

Run migrations

php artisan migrate

Seed the database

php artisan db:seed --class="NorwegianZipCodeSeeds"

Populate the database

php artisan zip_codes:update

Start using the models

	$zip_code     = \NorwegianZipCodes\Models\ZipCode::find('7340');
	$municipality = $zip_code->municipality;
	$county       = $municipality->county

ER diagram

ER diagram

Note

All IDs for counties, municipalities and zip_codes are strings. This is because officially the IDs are zero padded, fixed size. (4 for zip codes and municipalities, 2 for counties)

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2017-12-26