PHPackages                             viitortest/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. [Utility &amp; Helpers](/categories/utility)
4. /
5. viitortest/contactable

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

viitortest/contactable
======================

Provide the contacts to store multiple contacts at one place

161PHP

Since Apr 29Pushed 6y ago1 watchersCompare

[ Source](https://github.com/vc-dhavaljoshi/contactable)[ Packagist](https://packagist.org/packages/viitortest/contactable)[ RSS](/packages/viitortest-contactable/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

Contact
=======

[](#contact)

**Contacts** is a polymorphic Laravel package, for contact management system. You can add contacts to any eloquent model with ease.

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

[](#installation)

1. Install the package via composer:

    ```
    composer require viitortest/contactable
    ```
2. Publish resources (migrations and config files):

    ```
    php artisan vendor:publish --tag=contact-migrations
    php artisan vendor:publish --tag=contact-config
    ```
3. Execute migrations via the following command:

    ```
    php artisan migrate
    ```
4. Done!

Usage
-----

[](#usage)

To add contacts support to your eloquent models simply use `\Viitortest\Contacts\Traits\HasContacts` trait.

### Manage your contacts

[](#manage-your-contacts)

```
// Get instance of your model
$user = new \App\Models\User::find(1);

// Create a single contact
$user->addContact([
    'name' => 'Dhaval Joshi',
    'email' => 'dhaval@example.com',
    'phone' => '9999999999',
]);

// Create a multiple contacts
$user->addManyContacts(
[
    [
    'name' => 'Dhaval Joshi',
    'email' => 'dhaval@example.com',
    'phone' => '9999999999',
    ],
    [
    'name' => 'Shailesh Jakhaniya',
    'email' => 'shailesh@example.com',
    'phone' => '9999999999',
    ]
]);

// Find an existing contact
$contact = Contactable::find(1);

// Update an existing contact
$contact->update([
    'email' => 'iOmranic@gmail.com',
]);

// Delete contact
$contact->delete();

// Alternative way of contact deletion
$user->contacts()->where('id', 123)->first()->delete();

// Get attached contacts collection
$user->contacts;

// Get attached contacts query builder
$user->contacts();
```

###  Health Score

19

—

LowBetter than 10% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity33

Early-stage or recently created project

 Bus Factor1

Top contributor holds 66.7% 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.

### Community

Maintainers

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

---

Top Contributors

[![vc-dhavaljoshi](https://avatars.githubusercontent.com/u/37901172?v=4)](https://github.com/vc-dhavaljoshi "vc-dhavaljoshi (8 commits)")[![vcshailesh](https://avatars.githubusercontent.com/u/36290893?v=4)](https://github.com/vcshailesh "vcshailesh (3 commits)")[![shailesh-jakhaniya](https://avatars.githubusercontent.com/u/17358349?v=4)](https://github.com/shailesh-jakhaniya "shailesh-jakhaniya (1 commits)")

### Embed Badge

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

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

###  Alternatives

[christian-riesen/base32

Base32 encoder/decoder according to RFC 4648

13331.8M61](/packages/christian-riesen-base32)

PHPackages © 2026

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