PHPackages                             rmsramos/postal-code - 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. rmsramos/postal-code

ActiveLibrary

rmsramos/postal-code
====================

CEP integration with ViaCep

v0.1.1(1y ago)6116↓100%2MITPHPPHP ^8.1

Since Sep 12Pushed 1y ago1 watchersCompare

[ Source](https://github.com/rmsramos/postal-code)[ Packagist](https://packagist.org/packages/rmsramos/postal-code)[ Docs](https://github.com/rmsramos/postal-code)[ RSS](/packages/rmsramos-postal-code/feed)WikiDiscussions main Synced today

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

Filament CEP integration with ViaCep
====================================

[](#filament-cep-integration-with-viacep)

[![Latest Version on Packagist](https://camo.githubusercontent.com/a3c2131cd64d4bb02506375a07528f6e373e1b5241318576783f2c83bdd76741/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f726d7372616d6f732f706f7374616c2d636f64652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/rmsramos/postal-code)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/5d23d294d5581d225d87c1c9298cbdea2154e1d0be2d74b25eb11a0e38e355fd/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f726d7372616d6f732f706f7374616c2d636f64652f6669782d7068702d636f64652d7374796c652d6973737565732e796d6c3f6272616e63683d6d61696e266c6162656c3d636f64652532307374796c65267374796c653d666c61742d737175617265)](https://github.com/rmsramos/postal-code/actions?query=workflow%3A%22Fix+PHP+code+style+issues%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/a923e7be77697863b194073381225bc88ae8eeca5408438b213a0452ea5d3511/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f726d7372616d6f732f706f7374616c2d636f64652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/rmsramos/postal-code)

This package provides custom form field for Filament integration with ViaCep.

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

[](#installation)

You can install the package via composer:

```
composer require rmsramos/postal-code
```

Usage
-----

[](#usage)

```
use Filament\Forms\Components\TextInput;
use Rmsramos\PostalCode\Components\PostalCode;

public static function form(Form $form): Form
{
    return $form
        ->schema([
            PostalCode::make('postal_code')
                ->viaCep(
                    errorMessage: 'CEP inválido.', // Custom message to display if the CEP is invalid.
                    setFields: [
                        'street'        => 'logradouro',
                        'number'        => 'numero',
                        'complement'    => 'complemento',
                        'district'      => 'bairro',
                        'city'          => 'localidade',
                        'state'         => 'uf'
                    ]
                ),

            TextInput::make('street'),
            TextInput::make('number')
                 ->extraAlpineAttributes([
                     'x-on:cep.window' => "\$el.focus()",
                 ]),,
            TextInput::make('complement'),
            TextInput::make('district'),
            TextInput::make('city'),
            TextInput::make('state'),
        ])
}
```

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

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

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

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

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [Rômulo Ramos](https://github.com/rmsramos)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

###  Health Score

28

—

LowBetter than 57% of packages

Maintenance34

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity42

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 83.3% 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 ~266 days

Total

2

Last Release

656d ago

### Community

Maintainers

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

---

Top Contributors

[![rmsramos](https://avatars.githubusercontent.com/u/5170473?v=4)](https://github.com/rmsramos "rmsramos (10 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (1 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (1 commits)")

---

Tags

filamentlaravelviacep-apilaravelfilamentpostal-codeRmsramos

###  Code Quality

TestsPest

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/rmsramos-postal-code/health.svg)

```
[![Health](https://phpackages.com/badges/rmsramos-postal-code/health.svg)](https://phpackages.com/packages/rmsramos-postal-code)
```

###  Alternatives

[rupadana/filament-api-service

A simple api service for supporting filamentphp

20399.6k7](/packages/rupadana-filament-api-service)[guava/filament-modal-relation-managers

Allows you to embed relation managers inside filament modals.

7558.0k4](/packages/guava-filament-modal-relation-managers)[caresome/filament-auth-designer

Transform Filament's default auth pages into stunning, brand-ready experiences

3711.7k1](/packages/caresome-filament-auth-designer)[marcogermani87/filament-cookie-consent

Easy cookie consent integrations for Filament

1916.7k](/packages/marcogermani87-filament-cookie-consent)[omar-haris/filament-timezone-field

A Laravel Filament component that enables users to choose a specific timezone grouped by regions, with support for multiple languages.

1713.5k1](/packages/omar-haris-filament-timezone-field)[blendbyte/filament-title-with-slug

TitleWithSlugInput - Easy Permalink Slugs for the FilamentPHP Form Builder (PHP / Laravel / Livewire)

1321.6k3](/packages/blendbyte-filament-title-with-slug)

PHPackages © 2026

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