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 1mo ago

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 54% of packages

Maintenance33

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

703d 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

[bezhansalleh/filament-shield

Filament support for `spatie/laravel-permission`.

2.8k2.9M88](/packages/bezhansalleh-filament-shield)[pboivin/filament-peek

Full-screen page preview modal for Filament

253319.6k12](/packages/pboivin-filament-peek)[croustibat/filament-jobs-monitor

Background Jobs monitoring like Horizon for all drivers for FilamentPHP

254255.2k6](/packages/croustibat-filament-jobs-monitor)[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)[stephenjude/filament-jetstream

A Laravel starter kit built with Filament inspired by Jetstream.

17554.3k2](/packages/stephenjude-filament-jetstream)[creagia/filament-code-field

A Filamentphp input field to edit or view code data.

58289.3k3](/packages/creagia-filament-code-field)

PHPackages © 2026

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