PHPackages                             wraps/filament-contacts - 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. wraps/filament-contacts

ActiveLibrary

wraps/filament-contacts
=======================

Polimorphic Contacts RelationManager for FilamentPHP

v1.0.0(5mo ago)01MITPHPPHP ^8.2

Since Dec 4Pushed 5mo agoCompare

[ Source](https://github.com/raponiwalter/filament-contacts)[ Packagist](https://packagist.org/packages/wraps/filament-contacts)[ RSS](/packages/wraps-filament-contacts/feed)WikiDiscussions main Synced 1mo ago

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

Filament Contacts
=================

[](#filament-contacts)

[![Latest Version on Packagist](https://camo.githubusercontent.com/da908586ed863ae7d94ef3f1b17d967ec499f64bc6290d0432aa6e0d9e585f97/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f77726170732f66696c616d656e742d636f6e74616374732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/wraps/filament-contacts)[![Total Downloads](https://camo.githubusercontent.com/1e69f39b748ba0fdb78991556b413805350198b956cde006744c09bc7dabd18a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f77726170732f66696c616d656e742d636f6e74616374732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/wraps/filament-contacts)[![License](https://camo.githubusercontent.com/ece34b3b54cc06392d01fc9d72941c72ef426032fb5de487db032e375d6d08ed/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f77726170732f66696c616d656e742d636f6e74616374732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/wraps/filament-contacts)

**Filament Contacts** is a powerful and flexible plugin for FilamentPHP v3/v4 that adds a polymorphic relationship manager to handle multiple contacts (emails, phone numbers, addresses) for any Eloquent model.

It features a built-in "Primary Contact" logic, customizable options, and a clean UI fully integrated with Filament.

[![Screenshot of the relation manager](docs/relation-manager.jpg)](docs/relation-manager.jpg)

[![Screenshot of the table with related contacts](docs/customers-list.jpg)](docs/customers-list.jpg)

Features
--------

[](#features)

- **Polymorphic Relationship**: Attach contacts to Users, Clients, Suppliers, or any other model.
- **Primary Contact Logic**: Automatically handles the `is_primary` flag (toggling one sets others to false).
- **Fully Customizable**: Control visibility of fields, icons, and modal behavior via a fluent API.
- **Soft Deletes**: Built-in support for soft deletes to safely manage data.
- **Localization**: Available in English and Italian.

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

[](#installation)

You can install the package via composer:

```
composer require wraps/filament-contacts
```

Publish and run the migrations:

```
php artisan filament-contacts:install
```

migrations and `config/filament-contacts.php` will be published.

> If the table name "contacts" does not suits your project PLEASE update the config file before migrate

Usage
-----

[](#usage)

**1. Add the Trait to your Model**Add the `HasContacts` trait to any model where you want to attach contacts.

```
namespace App\Models;

use Illuminate\Database\Eloquent\Model;
use Wraps\FilamentContacts\Traits\HasContacts;

class Customer extends Model
{
    use HasContacts;
}
```

**2. Register the Relation Manager**

Add the `ContactsRelationManager` to your Filament Resource `getRelations()` method.

```
namespace App\Filament\Resources;

use App\Filament\Resources\CustomerResource\Pages;
use App\Models\Customer;
use Filament\Resources\Resource;
use Wraps\FilamentContacts\Filament\Resources\RelationManagers\ContactsRelationManager;

class CustomerResource extends Resource
{
    public static function getRelations(): array
    {
        return [
            ContactsRelationManager::class,
        ];
    }
}
```

That's it! You now have a fully functional contacts manager tab in your resource.

Configuration &amp; Customization
---------------------------------

[](#configuration--customization)

You can customize the behavior of the relation manager by overriding the `getFilamentContactOptions()` method in your Model.

**Available Options**

The `ContactOptions` class provides a fluent API to configure the UI:

- `searchable(bool)`: Toggle search visibility.
- `readonly(bool)`: Disable create/edit/delete actions.
- `slideOver(bool)`: Use a slide-over modal instead of a standard modal.
- `hide(array)`: Hide specific fields (email, phone, address).
- `icons(array)`: Override default icons.

**Example: Customizing the implementation**

In your Model (e.g., `Customer.php`):

```
use Wraps\FilamentContacts\Support\ContactOptions;
use Wraps\FilamentContacts\Support\ContactColumn;

public function getFilamentContactOptions(): ContactOptions
{
    return ContactOptions::make()
        ->searchable(true)     // Enable search
        ->slideOver(true)      // Open forms in a slide-over
        ->hide([               // Hide specific columns if not needed
            ContactColumn::ADDRESS
        ])
        ->icons([              // Custom icons
            'create' => 'heroicon-m-user-plus',
        ]);
}
```

**Retrieving the Primary Contact**

Since the plugin handles the is\_primary logic automatically, you can easily retrieve the main contact for a model:

```
TextColumn::make('primaryContact.email')
    ->label('Email')
    ->icon('heroicon-m-envelope')
    ->copyable()
    ->searchable(),
```

**Translations**

This package is currently translated into:

- English
- Italian

To publish translations:

```
php artisan vendor:publish --tag="filament-contacts-translations"
```

###  Health Score

34

—

LowBetter than 77% of packages

Maintenance77

Regular maintenance activity

Popularity1

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity46

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

Unknown

Total

1

Last Release

156d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/d66d3c798e6ad422ca540d0a4149545eb70785155c2f41a607c4d9113a7c6c92?d=identicon)[walter.raponi](/maintainers/walter.raponi)

---

Top Contributors

[![raponiwalter](https://avatars.githubusercontent.com/u/52984?v=4)](https://github.com/raponiwalter "raponiwalter (9 commits)")

### Embed Badge

![Health badge](/badges/wraps-filament-contacts/health.svg)

```
[![Health](https://phpackages.com/badges/wraps-filament-contacts/health.svg)](https://phpackages.com/packages/wraps-filament-contacts)
```

###  Alternatives

[bezhansalleh/filament-shield

Filament support for `spatie/laravel-permission`.

2.8k2.9M88](/packages/bezhansalleh-filament-shield)[guava/calendar

Adds support for vkurko/calendar to Filament PHP.

298241.0k3](/packages/guava-calendar)[awcodes/filament-quick-create

Plugin for Filament Admin that adds a dropdown menu to the header to quickly create new items.

246177.6k7](/packages/awcodes-filament-quick-create)[stephenjude/filament-two-factor-authentication

Filament Two Factor Authentication: Google 2FA + Passkey Authentication

81158.7k4](/packages/stephenjude-filament-two-factor-authentication)[hydrat/filament-table-layout-toggle

Filament plugin adding a toggle button to tables, allowing user to switch between Grid and Table layouts.

6292.3k1](/packages/hydrat-filament-table-layout-toggle)[marcelweidum/filament-passkeys

Use passkeys in your filamentphp app

5925.8k](/packages/marcelweidum-filament-passkeys)

PHPackages © 2026

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