PHPackages                             aecor/contactable - 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. aecor/contactable

ActiveLibrary

aecor/contactable
=================

Add multiple contacts for a User

1.0.3(5y ago)01101MITPHPPHP ^7.4|^8.0

Since Nov 20Pushed 5y ago1 watchersCompare

[ Source](https://github.com/adhalwala/contactable)[ Packagist](https://packagist.org/packages/aecor/contactable)[ Docs](https://github.com/aecor/contactable)[ RSS](/packages/aecor-contactable/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (4)Dependencies (4)Versions (5)Used By (0)

Add multiple contacts for a User
================================

[](#add-multiple-contacts-for-a-user)

[![Latest Version on Packagist](https://camo.githubusercontent.com/27b0729be234cd8380e5cc19fd9b41a6817002274ea3405bafa4b6494ea10525/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6165636f722f636f6e7461637461626c652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/aecor/contactable)[![GitHub Tests Action Status](https://camo.githubusercontent.com/83a84f39564f3f59d530f1622344930606235b5f3b7d9f43f42d182b96d029b1/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f6165636f722f636f6e7461637461626c652f72756e2d74657374733f6c6162656c3d7465737473)](https://github.com/aecor/contactable/actions?query=workflow%3Arun-tests+branch%3Amaster)[![Total Downloads](https://camo.githubusercontent.com/d18d82c8cc1275e5250c7808b0a9275f27ac9b409334caa0d555f91310bd5a69/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6165636f722f636f6e7461637461626c652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/aecor/contactable)

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

[](#installation)

You can install the package via composer:

```
composer require aecor/contactable
```

You can publish and run the migrations with:

```
php artisan vendor:publish --provider="Aecor\Contact\ContactServiceProvider" --tag="migrations"
php artisan migrate
```

You can publish the config file with:

```
php artisan vendor:publish --provider="Aecor\Contact\ContactServiceProvider" --tag="config"
```

This is the contents of the published config file:

```
return [
    'table-name' => 'contacts'
];
```

Usage and few examples
----------------------

[](#usage-and-few-examples)

Prepare your model

```
namespace App\Models;

use Illuminate\Database\Eloquent\Model;
use Aecor\Contact\Traits\HasContact;

class YourModel extends Model
{
    use HasContact;
}
```

Get instance of your model

```
$user = \App\Models\User::find(1);
```

Add a single contact

```
$user->addContact([
    'type' => 'phone',
    'value' => '9999999999',
    'custom_attributes' => [
        'sub_type' => 'office'
    ],                          // Optional field
    'order_column' => 1         // Optional field
]);
```

Add multiple contacts

```
$user->addManyContacts([
    [
        'type' => 'phone',
        'value' => '9999999999',
    ],
    [
        'type' => 'mobile',
        'value' => '8888888888',
    ],
    [
        'type' => 'email',
        'value' => 'john@example.com',
    ],
]);
```

Get all contacts

```
$user->contacts;
```

Get contacts with condition

```
$user->contacts()->where('type', 'mobile')->get();
```

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)

- [Abrar Dhalwala](https://github.com/adhalwala)
- [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

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity62

Established project with proven stability

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

Total

4

Last Release

1910d ago

PHP version history (2 changes)1.0.0PHP ^7.4

1.0.3PHP ^7.4|^8.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/62330833?v=4)[Abrar Dhalwala](/maintainers/adhalwala)[@adhalwala](https://github.com/adhalwala)

---

Top Contributors

[![adhalwala](https://avatars.githubusercontent.com/u/62330833?v=4)](https://github.com/adhalwala "adhalwala (15 commits)")

---

Tags

aecorcontactable

###  Code Quality

TestsPHPUnit

Static AnalysisPsalm

Type Coverage Yes

### Embed Badge

![Health badge](/badges/aecor-contactable/health.svg)

```
[![Health](https://phpackages.com/badges/aecor-contactable/health.svg)](https://phpackages.com/packages/aecor-contactable)
```

###  Alternatives

[bezhansalleh/filament-shield

Filament support for `spatie/laravel-permission`.

2.8k2.9M88](/packages/bezhansalleh-filament-shield)[illuminate/console

The Illuminate Console package.

12944.1M5.1k](/packages/illuminate-console)[timokoerber/laravel-one-time-operations

Run operations once after deployment - just like you do it with migrations!

6481.7M11](/packages/timokoerber-laravel-one-time-operations)[vormkracht10/laravel-mails

Laravel Mails can collect everything you might want to track about the mails that has been sent by your Laravel app.

24149.7k](/packages/vormkracht10-laravel-mails)[wnx/laravel-sends

Keep track of outgoing emails in your Laravel application.

200427.3k](/packages/wnx-laravel-sends)[illuminate/process

The Illuminate Process package.

44699.5k65](/packages/illuminate-process)

PHPackages © 2026

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