PHPackages                             agenciafmd/admix-addresses - 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. agenciafmd/admix-addresses

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

agenciafmd/admix-addresses
==========================

Endereços - Agência F&amp;MD

1.0.0(6y ago)0998BladeCI failing

Since Jan 14Pushed 4y ago4 watchersCompare

[ Source](https://github.com/agenciafmd/admix-addresses)[ Packagist](https://packagist.org/packages/agenciafmd/admix-addresses)[ Docs](https://github.com/agenciafmd/admix-addresses)[ RSS](/packages/agenciafmd-admix-addresses/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (2)Versions (4)Used By (0)

F&amp;MD - Addresses
====================

[](#fmd---addresses)

[![Área administrativa](https://github.com/agenciafmd/admix-addresses/raw/master/docs/screenshot.jpg "Área administrativa")](https://github.com/agenciafmd/admix-addresses/raw/master/docs/screenshot.jpg)

[![Downloads](https://camo.githubusercontent.com/0865a52bb8b23466e3255b838740139596e16dc9e1a9c74cddda6393ecc78100/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6167656e636961666d642f61646d69782d6164647265737365732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/agenciafmd/admix-addresses)[![Licença](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)

- Acopla os campos de endereço / mapa na model

Instalação
----------

[](#instalação)

```
composer require agenciafmd/admix-addresses:dev-master

```

Configuração
------------

[](#configuração)

### Model

[](#model)

Na model `Package.php` acrescente a `Trait` e o `$guarded`

```
use Agenciafmd\Addresses\Traits\AddressTrait;
...
class Package extends Model implements AuditableContract
...
    use AddressTrait
...
    protected $guarded = [
        ...'address',...
    ];

```

### View (TODO: refatorar para o blade component)

[](#view-todo-refatorar-para-o-blade-component)

Na view que será implementada os endereços, adicione

```
@include('agenciafmd/addresses::default')

```

Caso seja necessário a customização, adicione

```
@include('agenciafmd/addresses::default', ['title' => 'Endereço do Ponto de Venda', 'collection' => 'pos'])

```

Acrescente tambem os scripts no `@push('scripts')`

```
@push('scripts')
    @include('agenciafmd/addresses::scripts')
@endpush

```

### Validação

[](#validação)

Em `Http/Requests/PackageRequest.php` acrescentar

```
public function rules()
{
    return [
        ...
            'address.*.full_street' => [
                'required',
                'max:150',
            ],
            'address.*.postcode' => [
                'required',
                'max:150',
            ],
            'address.*.street' => [
                'required',
                'max:150',
            ],
            'address.*.number' => [
                'required',
                'max:150',
            ],
            'address.*.complement' => [
                'nullable',
                'max:150',
            ],
            'address.*.neighborhood' => [
                'required',
                'max:150',
            ],
            'address.*.city' => [
                'required',
                'max:150',
            ],
            'address.*.state' => [
                'required',
                'max:150',
            ],
            'address.*.state_initials' => [
                'required',
                'max:150',
            ],
            'address.*.latitude' => [
                'required',
                'max:150',
            ],
            'address.*.longitude' => [
                'required',
                'max:150',
            ],
        ...
    ];
}

public function attributes()
{
    return [
        ...
        'address.*.full_street' => 'endereço completo',
        'address.*.postcode' => 'cep',
        'address.*.street' => 'endereço',
        'address.*.number' => 'número',
        'address.*.complement' => 'complemento',
        'address.*.neighborhood' => 'bairro',
        'address.*.city' => 'cidade',
        'address.*.state' => 'estado',
        'address.*.state_initials' => 'sigla do estado',
        'address.*.latitude' => 'latitude',
        'address.*.longitude' => 'longitude',
        ...
    ];
}

```

### Factories (TODO: refatorar o how to)

[](#factories-todo-refatorar-o-how-to)

```
...
$item->addAddress('default', [
    'full_street' => $faker->streetAddress,
    'postcode' => $faker->postcode,
    'street' => $faker->streetName,
    'number' => $faker->buildingNumber,
    'neighborhood' => $faker->citySuffix,
    'complement' => $faker->citySuffix,
    'city' => $faker->city,
    'state' => $faker->state,
    'state_initials' => $faker->stateAbbr,
    'latitude' => $faker->latitude($min = -20.8, $max = -20.9),
    'longitude' => $faker->longitude($min = -49.4, $max = -50.3),
]);
...

```

Uso
---

[](#uso)

Quando for necessário, chame os dados

```
$model->address()->full_street
$model->address()->postcode
$model->address()->street
$model->address()->number
$model->address()->complement
$model->address()->neighborhood
$model->address()->city
$model->address()->state
$model->address()->state_initials
$model->address()->latitude
$model->address()->longitude

```

Segurança
---------

[](#segurança)

Caso encontre alguma falha de segurança, por favor, envie um email para  ao invés de abrir uma issue.

Creditos
--------

[](#creditos)

- [Tarsísio Xavier](https://github.com/TarsisioXavier)

Licença
-------

[](#licença)

Licença MIT. [Clique aqui](LICENSE.md) para mais detalhes.

###  Health Score

29

—

LowBetter than 63% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 54.2% 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 ~364 days

Total

2

Last Release

1893d ago

Major Versions

1.0.0 → v6.x-dev2021-01-13

### Community

Maintainers

![](https://www.gravatar.com/avatar/7e4d60ba30f409161026fd37c5a106cc32c4e4d29411f805553623cca632dd72?d=identicon)[agenciafmd](/maintainers/agenciafmd)

---

Top Contributors

[![TarsisioXavier](https://avatars.githubusercontent.com/u/24587222?v=4)](https://github.com/TarsisioXavier "TarsisioXavier (13 commits)")[![irineujunior](https://avatars.githubusercontent.com/u/260451?v=4)](https://github.com/irineujunior "irineujunior (10 commits)")[![cstamagawa](https://avatars.githubusercontent.com/u/13224452?v=4)](https://github.com/cstamagawa "cstamagawa (1 commits)")

---

Tags

addressagenciafmdbrazilcoordinateslaravelmapphpphplaravelbrasilenderecoagenciafmdmapacoordenadas

### Embed Badge

![Health badge](/badges/agenciafmd-admix-addresses/health.svg)

```
[![Health](https://phpackages.com/badges/agenciafmd-admix-addresses/health.svg)](https://phpackages.com/packages/agenciafmd-admix-addresses)
```

###  Alternatives

[mediconesystems/livewire-datatables

Advanced datatables using Laravel, Livewire, Tailwind CSS and Alpine JS

1.2k706.5k8](/packages/mediconesystems-livewire-datatables)[werxe/laravel-collection-macros

Custom Laravel Collection macros.

2625.8k](/packages/werxe-laravel-collection-macros)[salmanzafar/laravel-geocode

A Laravel Library to find Lat and Long of a given Specific Address

153.8k](/packages/salmanzafar-laravel-geocode)[wujunze/money-wrapper

MoneyPHP Wrapper

113.8k](/packages/wujunze-money-wrapper)

PHPackages © 2026

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