PHPackages                             zoparga/laravel-contact-information - 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. [Database &amp; ORM](/categories/database)
4. /
5. zoparga/laravel-contact-information

ActiveLibrary[Database &amp; ORM](/categories/database)

zoparga/laravel-contact-information
===================================

Add many address to many model with a single trait. E.g.: many shipping address for a customer.

0.8.1(4y ago)012MITPHPPHP ^7.3|^8.0

Since Mar 24Pushed 4y ago1 watchersCompare

[ Source](https://github.com/zoparga/laravel-contact-information)[ Packagist](https://packagist.org/packages/zoparga/laravel-contact-information)[ Docs](https://github.com/zoparga/laravel-contact-information)[ GitHub Sponsors](https://github.com/zoparga)[ RSS](/packages/zoparga-laravel-contact-information/feed)WikiDiscussions main Synced 1mo ago

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

Add many address to many model with a single trait. E.g.: many shipping address for a customer.
===============================================================================================

[](#add-many-address-to-many-model-with-a-single-trait-eg-many-shipping-address-for-a-customer)

[![Latest Version on Packagist](https://camo.githubusercontent.com/4f9d7d1a06a280eaaca31d7596eb08035f9006550924c7c0a26f55fd80c517e9/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7a6f70617267612f6c61726176656c2d636f6e746163742d696e666f726d6174696f6e2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/zoparga/laravel-contact-information)[![GitHub Tests Action Status](https://camo.githubusercontent.com/4c6625ee66dfec8107612a6a4b9e2e6b2b210c11d7c0af0f46f93aeb6dc00c59/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f7a6f70617267612f6c61726176656c2d636f6e746163742d696e666f726d6174696f6e2f72756e2d74657374733f6c6162656c3d7465737473)](https://github.com/zoparga/laravel-contact-information/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/c13124b1972310d1ef0be7bad5deaedb3657f6ba84d086c7cc63ea819622bcef/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f7a6f70617267612f6c61726176656c2d636f6e746163742d696e666f726d6174696f6e2f436865636b253230262532306669782532307374796c696e673f6c6162656c3d636f64652532307374796c65)](https://github.com/zoparga/laravel-contact-information/actions?query=workflow%3A%22Check+%26+fix+styling%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/92d64a5abc5102d91d0e546f6c1b8fcc2b44273cfad4ceaf70363a5aa9e5fd71/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7a6f70617267612f6c61726176656c2d636f6e746163742d696e666f726d6174696f6e2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/zoparga/laravel-contact-information)

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

[](#installation)

You can install the package via composer:

```
composer require zoparga/laravel-contact-information
```

You can publish and run the migrations with:

```
php artisan vendor:publish --provider="zoparga\ContactInformation\ContactInformationServiceProvider" --tag="contact-information-migrations"
php artisan migrate
```

You can publish the config file with:

```
php artisan vendor:publish --provider="zoparga\ContactInformation\ContactInformationServiceProvider" --tag="laravel-contact-information-config"
```

This is the contents of the published config file:

Usage
-----

[](#usage)

- publish migration file
- migrate
- add trait to model
- use it

Prepare model
-------------

[](#prepare-model)

use zoparga\\ContactInformation\\Traits\\ContactInformationeableTrait;

class {{model}} extends Model { use ContactInformationeableTrait; }

```
$model = \App\Models\Model::find(1);

$model->contactInformations()->create([
    'type' => 'phone',
    'information' => '+361123123',
    'primary' => 1,
]);

$model->contactInformations()->create([
    'type' => 'web',
    'information' => 'info.xyz',
    'primary' => 1,
]);

$contactInformationId = 1;

$model->updateContactInformation($contactInformationId, [
    'type' => 'phone',
    'information' => '+361123123',
    'primary' => 0,
]);

Get the addresses, order by ID - desc
Or you can limit it here
$model->getLatestContactInformationes()->get();

Or you can limit it here
$model->getLatestContactInformationes()->limit(3)->get();

Of course you can get last created address
$model->getLastContactInformation();
```

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

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

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

[](#contributing)

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

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

[](#security-vulnerabilities)

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

Credits
-------

[](#credits)

- [Papp Zoltán](https://github.com/zoparga)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

###  Health Score

21

—

LowBetter than 19% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity45

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

Total

2

Last Release

1476d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/22a5be5fde39a2a8b568a6b58f19db59352605afe5ba0c7ae42deeb5990d1fb4?d=identicon)[zoparga](/maintainers/zoparga)

---

Top Contributors

[![zoparga](https://avatars.githubusercontent.com/u/15894503?v=4)](https://github.com/zoparga "zoparga (2 commits)")

---

Tags

laravelzopargalaravel-contact-information

###  Code Quality

TestsPest

Static AnalysisPsalm

Type Coverage Yes

### Embed Badge

![Health badge](/badges/zoparga-laravel-contact-information/health.svg)

```
[![Health](https://phpackages.com/badges/zoparga-laravel-contact-information/health.svg)](https://phpackages.com/packages/zoparga-laravel-contact-information)
```

###  Alternatives

[dyrynda/laravel-model-uuid

This package allows you to easily work with UUIDs in your Laravel models.

4802.8M8](/packages/dyrynda-laravel-model-uuid)[spatie/laravel-model-flags

Add flags to Eloquent models

4301.1M1](/packages/spatie-laravel-model-flags)[clickbar/laravel-magellan

This package provides functionality for working with the postgis extension in Laravel.

423715.4k1](/packages/clickbar-laravel-magellan)[spatie/laravel-sql-commenter

Add comments to SQL queries made by Laravel

1931.4M1](/packages/spatie-laravel-sql-commenter)[spatie/laravel-deleted-models

Automatically copy deleted records to a separate table

409109.8k4](/packages/spatie-laravel-deleted-models)[wnx/laravel-backup-restore

A package to restore database backups made with spatie/laravel-backup.

203330.1k2](/packages/wnx-laravel-backup-restore)

PHPackages © 2026

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