PHPackages                             jolanuk/filament-postcodes - 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. jolanuk/filament-postcodes

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

jolanuk/filament-postcodes
==========================

A valid UK postcode generator for FilamentPHP.

v5.0.0(2mo ago)05[1 PRs](https://github.com/jolanUK/filament-postcodes/pulls)MITPHPPHP ^8.2CI passing

Since Mar 1Pushed 1mo agoCompare

[ Source](https://github.com/jolanUK/filament-postcodes)[ Packagist](https://packagist.org/packages/jolanuk/filament-postcodes)[ Docs](https://github.com/jolanuk/filament-postcodes)[ GitHub Sponsors](https://github.com/jolanUK)[ RSS](/packages/jolanuk-filament-postcodes/feed)WikiDiscussions 5.x Synced 1mo ago

READMEChangelog (1)Dependencies (12)Versions (3)Used By (0)

filament-postcodes
==================

[](#filament-postcodes)

[![Latest Version on Packagist](https://camo.githubusercontent.com/5fda7925b4b12ac1f1c43c35c3f2372f3ad016cc9c34b101765105508cbf4b75/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6a6f6c616e756b2f66696c616d656e742d706f7374636f6465732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/jolanuk/filament-postcodes)[![GitHub Tests Action Status](https://camo.githubusercontent.com/3eea786b1f0430767c68c788dd6af85a5994e08b327a03b4469d91e1763ba94f/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6a6f6c616e756b2f66696c616d656e742d706f7374636f6465732f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/jolanuk/filament-postcodes/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/b6d6acf569ad344f36ceb551b96b23832d0db34fa57874ff035a6b46caf97736/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6a6f6c616e756b2f66696c616d656e742d706f7374636f6465732f6669782d7068702d636f64652d7374796c652d6973737565732e796d6c3f6272616e63683d6d61696e266c6162656c3d636f64652532307374796c65267374796c653d666c61742d737175617265)](https://github.com/jolanuk/filament-postcodes/actions?query=workflow%3A%22Fix+PHP+code+styling%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/367329fbe2ef1e8e47974e5be73fc7ed7a8a6e76996f88c1cb45ededfad8982b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6a6f6c616e756b2f66696c616d656e742d706f7374636f6465732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/jolanuk/filament-postcodes)

A valid UK postcode generator for FilamentPHP, structurally inspired by the Brazilian equivalent developed by [Otávio Araújo](https://github.com/otavio-araujo/filament-smart-cep). This version uses the API found at [postcodes.io](https://postcodes.io).

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require jolanuk/filament-postcodes
```

Usage
-----

[](#usage)

Similar to SmartCEP, Filament Postcodes also implements field bindings.

```
use jolanUK\FilamentPostcodes\Forms\Components\PostcodeField;

PostcodeField::make('postcode')
    ->bindQualityField('quality')
    ->bindEastingsField('eastings')
    ->bindNorthingsField('northings')
    ->bindCountryField('country')
    ->bindNHSHAField('nhs_ha')
    ->bindLongitudeField('longitude')
    ->bindLatitudeField('latitude')
    ->bindEuropeanElectoralRegionField('european_electoral_region')
    ->bindPrimaryCareTrustField('primary_care_trust')
    ->bindRegionField('region')
    ->bindLSOAField('lsoa')
    ->bindMSOAField('msoa')
    ->bindIncodeField('incode')
    ->bindOutcodeField('outcode')
    ->bindParliamentaryConstituencyField('parliamentary_constituency')
    ->bindParliamentaryConstituency2024Field('parliamentary_constituency_2024')
    ->bindAdminDistrictField('admin_district')
    ->bindParishField('parish')
    ->bindAdminCountyField('admin_county')
    ->bindDateOfIntroductionField('date_of_introduction')
    ->bindAdminWardField('admin_ward')
    ->bindCEDField('ced')
    ->bindCCGField('ccg')
    ->bindNUTSField('nuts')
    ->bindPFAField('pfa')
    ->bindNHSRegionField('nhs_region')
    ->bindTTWAField('ttwa')
    ->bindNationalParkField('national_park')
    ->bindBUAField('bua')
    ->bindICBField('icb')
    ->bindCancerAllianceField('cancer_alliance')
    ->bindLSOA11Field('lsoa11')
    ->bindMSOA11Field('msoa11')
    ->bindLSOA21Field('lsoa21')
    ->bindMSOA21Field('msoa21')
    ->bindOA21Field('oa21')
    ->bindRUC11Field('ruc11')
    ->bindRUC21Field('ruc21')
    ->bindLEP1Field('lep1')
    ->bindLEP2Field('lep2'),
```

This will bind to a field in the same schema, with the matching machine name.

```
TextInput::make('quality'),
TextInput::make('eastings'),
TextInput::make('northings'),
TextInput::make('country'),
TextInput::make('nhs_ha'),
TextInput::make('longitude'),
TextInput::make('latitude'),
TextInput::make('european_electoral_region'),
TextInput::make('primary_care_trust'),
TextInput::make('region'),
TextInput::make('lsoa'),
TextInput::make('msoa'),
TextInput::make('incode'),
TextInput::make('outcode'),
TextInput::make('parliamentary_constituency'),
TextInput::make('parliamentary_constituency_2024'),
TextInput::make('admin_district'),
TextInput::make('parish'),
TextInput::make('admin_county'),
TextInput::make('date_of_introduction'),
TextInput::make('admin_ward'),
TextInput::make('ced'),
TextInput::make('ccg'),
TextInput::make('nuts'),
TextInput::make('pfa'),
TextInput::make('nhs_region'),
TextInput::make('ttwa'),
TextInput::make('national_park'),
TextInput::make('bua'),
TextInput::make('icb'),
TextInput::make('cancer_alliance'),
TextInput::make('lsoa11'),
TextInput::make('msoa11'),
TextInput::make('lsoa21'),
TextInput::make('msoa21'),
TextInput::make('oa21'),
TextInput::make('ruc11'),
TextInput::make('ruc21'),
TextInput::make('lep1'),
TextInput::make('lep2'),
```

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please [email me directly](mailto:development@jolan.uk) to report security vulnerabilities.

Credits
-------

[](#credits)

- [Kris Young](https://github.com/jolanUK)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

39

—

LowBetter than 86% of packages

Maintenance88

Actively maintained with recent releases

Popularity5

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity47

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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 ~6 days

Total

2

Last Release

71d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/26c62063feaa2cc9251403f5c631dee8927b747714e64a1566b92baf2c2c0c48?d=identicon)[jolanUK](/maintainers/jolanUK)

---

Top Contributors

[![JolanUK](https://avatars.githubusercontent.com/u/224277820?v=4)](https://github.com/JolanUK "JolanUK (3 commits)")

---

Tags

laravelfilamentfilament-pluginfilamentphpjolanUKfilament-postcodes

###  Code Quality

TestsPest

Static AnalysisPHPStan, Rector

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/jolanuk-filament-postcodes/health.svg)

```
[![Health](https://phpackages.com/badges/jolanuk-filament-postcodes/health.svg)](https://phpackages.com/packages/jolanuk-filament-postcodes)
```

###  Alternatives

[dotswan/filament-map-picker

Easily pick and retrieve geo-coordinates using a map-based interface in your Filament applications.

124139.3k2](/packages/dotswan-filament-map-picker)[jibaymcs/filament-tour

Bring the power of DriverJs to your Filament panels and start a tour !

12247.8k](/packages/jibaymcs-filament-tour)[schmeits/filament-character-counter

This is a Filament character counter TextField and Textarea form field for Filament v4 and v5

33184.7k6](/packages/schmeits-filament-character-counter)[defstudio/filament-searchable-input

A searchable autocomplete input for Filament forms

3212.4k](/packages/defstudio-filament-searchable-input)[agencetwogether/hookshelper

Simple plugin to toggle display hooks available in current page.

2312.7k](/packages/agencetwogether-hookshelper)[jiten14/jitone-ai

jitone-ai is a powerful FilamentPHP plugin that integrates AI-powered features directly into your Filament forms.

213.1k](/packages/jiten14-jitone-ai)

PHPackages © 2026

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