PHPackages                             cleaniquecoders/profile - 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. [Mail &amp; Notifications](/categories/mail)
4. /
5. cleaniquecoders/profile

ActiveLibrary[Mail &amp; Notifications](/categories/mail)

cleaniquecoders/profile
=======================

Common Profile Information

6.3.0(3mo ago)143.0k3[2 PRs](https://github.com/cleaniquecoders/profile/pulls)4MITPHPPHP ^8.3 | ^8.4CI failing

Since Dec 24Pushed 1w agoCompare

[ Source](https://github.com/cleaniquecoders/profile)[ Packagist](https://packagist.org/packages/cleaniquecoders/profile)[ GitHub Sponsors](https://github.com/cleaniquecoders)[ RSS](/packages/cleaniquecoders-profile/feed)WikiDiscussions master Synced 2w ago

READMEChangelog (10)Dependencies (20)Versions (41)Used By (4)

Profile
=======

[](#profile)

A Laravel package for managing profile information (addresses, emails, phone numbers, websites, and bank accounts) using polymorphic relationships.

[![Latest Stable Version](https://camo.githubusercontent.com/b77640679ac8546cda0c43910df6b530061c4ac5150ddbcdda4c6d0364948d49/68747470733a2f2f706f7365722e707567782e6f72672f636c65616e69717565636f646572732f70726f66696c652f762f737461626c65)](https://packagist.org/packages/cleaniquecoders/profile) [![Total Downloads](https://camo.githubusercontent.com/6bcf3caa05a9600b4f6b10616a0c5ba694d1c6c5bea4e2a26724810f8b455e84/68747470733a2f2f706f7365722e707567782e6f72672f636c65616e69717565636f646572732f70726f66696c652f646f776e6c6f616473)](https://packagist.org/packages/cleaniquecoders/profile) [![Scrutinizer Code Quality](https://camo.githubusercontent.com/092c89c4170d58cf130ed6b3d49c3b8319c085742629414ec17dcc38724c64c8/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f636c65616e69717565636f646572732f70726f66696c652f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/cleaniquecoders/profile/?branch=master) [![License](https://camo.githubusercontent.com/6d04adec55055302ddaf05918378ca904d91fbeed03393136ddc6e7b68e98ac2/68747470733a2f2f706f7365722e707567782e6f72672f636c65616e69717565636f646572732f70726f66696c652f6c6963656e7365)](https://packagist.org/packages/cleaniquecoders/profile)

Features
--------

[](#features)

- **Polymorphic Design** - Reusable profile tables for any model
- **Trait-Based** - Use only what you need (addresses, emails, phones, websites, bank accounts)
- **Type-Safe** - Query scopes for phone types and other filters
- **Configurable** - Customize models and polymorphic type names
- **UUID Support** - Unique identifiers for external integrations
- **Soft Deletes** - Maintain audit trail of changes

Requirements
------------

[](#requirements)

- PHP ^8.3 | ^8.4
- Laravel ^11.0 | ^12.0

Quick Start
-----------

[](#quick-start)

### Installation

[](#installation)

```
composer require cleaniquecoders/profile
php artisan vendor:publish --tag=profile-migrations
php artisan migrate
php artisan profile:seed
```

### Basic Usage

[](#basic-usage)

Add the `HasProfile` trait to your model:

```
use CleaniqueCoders\Profile\Concerns\HasProfile;
use Illuminate\Database\Eloquent\Model;

class User extends Model
{
    use HasProfile;
}
```

Create profile information:

```
use CleaniqueCoders\Profile\Models\PhoneType;

// Create address
$user->addresses()->create([
    'primary' => '123 Main Street',
    'city' => 'Kuala Lumpur',
    'postcode' => '50088',
    'country_id' => 1,
]);

// Create phone numbers
$user->phones()->create([
    'phone_number' => '+60123456789',
    'phone_type_id' => PhoneType::MOBILE,
    'is_default' => true,
]);

// Create email
$user->emails()->create([
    'email' => 'john@example.com',
    'is_default' => true,
]);

// Create website
$user->websites()->create([
    'url' => 'https://example.com',
    'is_default' => true,
]);
```

Query profile information:

```
// Get all addresses
$addresses = $user->addresses;

// Get mobile phones only
$mobilePhones = $user->phones()->mobile()->get();

// Get default email
$email = $user->emails()->where('is_default', true)->first();
```

Available Traits
----------------

[](#available-traits)

TraitPurpose`HasProfile`Includes Addressable, Emailable, Phoneable, Websiteable`Addressable`Manage physical addresses`Emailable`Manage email addresses`Phoneable`Manage phone numbers (with types: home, mobile, office, fax, other)`Websiteable`Manage website URLs`Bankable`Manage bank account informationUse individual traits for specific needs:

```
use CleaniqueCoders\Profile\Concerns\Addressable;
use CleaniqueCoders\Profile\Concerns\Phoneable;

class Company extends Model
{
    use Addressable, Phoneable;
}
```

Documentation
-------------

[](#documentation)

📚 **[Complete Documentation](docs/)** - Comprehensive guides and API reference

### Quick Links

[](#quick-links)

- [Installation Guide](docs/01-getting-started/01-installation.md)
- [Configuration](docs/01-getting-started/02-configuration.md)
- [Quick Start Examples](docs/01-getting-started/03-quick-start.md)
- [Architecture Overview](docs/02-architecture/01-overview.md)
- [Usage Guides](docs/03-usage/)
- [API Reference](docs/04-api-reference/)
- [Best Practices](docs/03-usage/07-best-practices.md)

Use Cases
---------

[](#use-cases)

### Corporate Profiles

[](#corporate-profiles)

```
class Company extends Model
{
    use HasProfile, Bankable;
}

// Headquarters address
$company->addresses()->create([...]);

// Contact information
$company->phones()->create(['phone_type_id' => PhoneType::OFFICE, ...]);
$company->emails()->create(['email' => 'info@company.com', ...]);
$company->websites()->create(['url' => 'https://company.com', ...]);

// Banking details
$company->banks()->create([...]);
```

### Employee Management

[](#employee-management)

```
class Employee extends Model
{
    use HasProfile, Bankable;
}

// Home address for shipping
$employee->addresses()->create([...]);

// Multiple contact numbers
$employee->phones()->create(['phone_type_id' => PhoneType::MOBILE, ...]);
$employee->phones()->create(['phone_type_id' => PhoneType::HOME, ...]);

// Payroll bank account
$employee->banks()->create([...]);
```

### Customer Records

[](#customer-records)

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

// Billing and shipping addresses
$customer->addresses()->create(['type' => 'billing', ...]);
$customer->addresses()->create(['type' => 'shipping', ...]);

// Multiple contact methods
$customer->emails()->create([...]);
$customer->phones()->mobile()->create([...]);
```

Testing
-------

[](#testing)

```
composer test
```

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

[](#contributing)

Contributions are welcome! Please see our [contribution guidelines](CONTRIBUTING.md) for details.

License
-------

[](#license)

This package is open-sourced software licensed under the [MIT license](LICENSE.txt).

###  Health Score

61

—

FairBetter than 99% of packages

Maintenance91

Actively maintained with recent releases

Popularity27

Limited adoption so far

Community18

Small or concentrated contributor base

Maturity93

Battle-tested with a long release history

 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.

###  Release Activity

Cadence

Every ~88 days

Recently: every ~130 days

Total

35

Last Release

92d ago

Major Versions

v2.0.0 → v3.0.02020-09-09

v3.1.2 → 4.0.02022-02-12

v3.1.3 → v4.1.12023-04-15

v4.1.1 → v5.0.02024-03-21

v5.0.0 → v6.0.02024-10-24

PHP version history (9 changes)v1.0.9PHP &gt;=7.1

v1.3.0PHP &gt;=7.2

v3.0.0PHP &gt;=7.3

3.1.0PHP ^8.0

4.0.0PHP ^8.0|^8.1

4.1.0PHP ^8.1|^8.2

v5.0.0PHP ^8.1 | ^8.2 | ^8.3

v6.0.0PHP ^8.3

6.1.0PHP ^8.3 | ^8.4

### Community

Maintainers

![](https://www.gravatar.com/avatar/b57069d0f4b634f65eccc6e5d5848990e25968d45ec2cf46d626c6a4658f944b?d=identicon)[nasrulhazim.m](/maintainers/nasrulhazim.m)

---

Top Contributors

[![nasrulhazim](https://avatars.githubusercontent.com/u/10341422?v=4)](https://github.com/nasrulhazim "nasrulhazim (142 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (38 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (32 commits)")[![peter279k](https://avatars.githubusercontent.com/u/9021747?v=4)](https://github.com/peter279k "peter279k (1 commits)")

---

Tags

addressbankemaillaravelpackagepolymorphprofile

###  Code Quality

TestsPest

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/cleaniquecoders-profile/health.svg)

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

###  Alternatives

[spatie/laravel-permission

Permission handling for Laravel 12 and up

12.9k98.0M1.3k](/packages/spatie-laravel-permission)[spatie/laravel-responsecache

Speed up a Laravel application by caching the entire response

2.8k8.7M64](/packages/spatie-laravel-responsecache)[spatie/laravel-health

Monitor the health of a Laravel application

87411.3M154](/packages/spatie-laravel-health)[defstudio/telegraph

A laravel facade to interact with Telegram Bots

815320.5k3](/packages/defstudio-telegraph)[illuminate/mail

The Illuminate Mail package.

6410.6M475](/packages/illuminate-mail)[harris21/laravel-fuse

Circuit breaker for Laravel queue jobs. Protect your workers from cascading failures.

43140.3k](/packages/harris21-laravel-fuse)

PHPackages © 2026

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