PHPackages                             phaza/laravel-norwegian-zip-codes - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. phaza/laravel-norwegian-zip-codes

AbandonedArchivedLibrary[Utility &amp; Helpers](/categories/utility)

phaza/laravel-norwegian-zip-codes
=================================

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

0.7(10y ago)18401MITPHPPHP &gt;=5.5CI failing

Since Mar 24Pushed 4y ago1 watchersCompare

[ Source](https://github.com/phaza/laravel-norwegian-zip-codes)[ Packagist](https://packagist.org/packages/phaza/laravel-norwegian-zip-codes)[ RSS](/packages/phaza-laravel-norwegian-zip-codes/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (5)Versions (5)Used By (0)

This package was sponsored by [tjenestetorget.no](https://tjenestetorget.no) / [TFinans.no](https://tfinans.no)
---------------------------------------------------------------------------------------------------------------

[](#this-package-was-sponsored-by-tjenestetorgetno--tfinansno)

What?
=====

[](#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
===

[](#how)

**Install the package**

```
composer require "phaza/laravel-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)

[![ER diagram](https://cloud.githubusercontent.com/assets/4553/6326216/b502e9f4-bb4f-11e4-81be-a03e91e9cbc4.png)](https://cloud.githubusercontent.com/assets/4553/6326216/b502e9f4-bb4f-11e4-81be-a03e91e9cbc4.png)

Note
----

[](#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)

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 87% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~45 days

Total

4

Last Release

3938d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/3142b43984be5ecb8559c6ba874c1875a319dc6fd3e3c7f230d00e1cb958583c?d=identicon)[phaza](/maintainers/phaza)

---

Top Contributors

[![phaza](https://avatars.githubusercontent.com/u/4553?v=4)](https://github.com/phaza "phaza (20 commits)")[![ideea](https://avatars.githubusercontent.com/u/318955?v=4)](https://github.com/ideea "ideea (3 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/phaza-laravel-norwegian-zip-codes/health.svg)

```
[![Health](https://phpackages.com/badges/phaza-laravel-norwegian-zip-codes/health.svg)](https://phpackages.com/packages/phaza-laravel-norwegian-zip-codes)
```

###  Alternatives

[wireui/wireui

TallStack components

1.8k1.3M16](/packages/wireui-wireui)[livewire/volt

An elegantly crafted functional API for Laravel Livewire.

4205.3M84](/packages/livewire-volt)[ramonrietdijk/livewire-tables

Dynamic tables for models with Laravel Livewire

21147.4k](/packages/ramonrietdijk-livewire-tables)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
