PHPackages                             tjenestetorget/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. tjenestetorget/norwegian-zip-codes

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

tjenestetorget/norwegian-zip-codes
==================================

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

1.2(8y ago)020.7k↓51.4%1MITPHPPHP &gt;=5.5

Since Dec 26Pushed 3y ago1 watchersCompare

[ Source](https://github.com/tjenestetorget/norwegian-zip-codes)[ Packagist](https://packagist.org/packages/tjenestetorget/norwegian-zip-codes)[ RSS](/packages/tjenestetorget-norwegian-zip-codes/feed)WikiDiscussions master Synced yesterday

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

This package was sponsored by [tjenestetorget.no](http://tjenestetorget.no) / [helsetjenester.no](http://helsetjenester.no)
---------------------------------------------------------------------------------------------------------------------------

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

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 "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)

[![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

33

—

LowBetter than 72% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity26

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

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 ~21 days

Total

3

Last Release

3068d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/b73421848a02d75b947de5b431006ec12b3a3c4d246c699b5182aff78cb6c339?d=identicon)[ideea](/maintainers/ideea)

---

Top Contributors

[![phaza](https://avatars.githubusercontent.com/u/4553?v=4)](https://github.com/phaza "phaza (19 commits)")[![alexanderpavlov](https://avatars.githubusercontent.com/u/3829470?v=4)](https://github.com/alexanderpavlov "alexanderpavlov (10 commits)")[![ideea](https://avatars.githubusercontent.com/u/318955?v=4)](https://github.com/ideea "ideea (7 commits)")[![sadonsergey](https://avatars.githubusercontent.com/u/11750848?v=4)](https://github.com/sadonsergey "sadonsergey (2 commits)")[![pavelsosipovs](https://avatars.githubusercontent.com/u/17043187?v=4)](https://github.com/pavelsosipovs "pavelsosipovs (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[markwalet/nova-modal-response

A Laravel Nova asset for Modal responses on an action.

17878.9k](/packages/markwalet-nova-modal-response)[crumbls/layup

A visual page builder plugin for Filament 5 — Divi-style grid layouts with extensible widgets.

592.7k2](/packages/crumbls-layup)[team-nifty-gmbh/tall-datatables

Server-side rendered datatables for Laravel and Livewire

1320.9k4](/packages/team-nifty-gmbh-tall-datatables)[tomshaw/electricgrid

A feature-rich Livewire package designed for projects that require dynamic, interactive data tables.

119.4k](/packages/tomshaw-electricgrid)

PHPackages © 2026

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