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

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

chuckcms/laravel-contacts
=========================

An easy way for attaching contacts to Eloquent models in Laravel.

v0.1.1(3y ago)1181MITPHPPHP ^7.2.5|^8.0

Since Sep 13Pushed 2y ago2 watchersCompare

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

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

Laravel Contacts
================

[](#laravel-contacts)

[![Latest Version on Packagist](https://camo.githubusercontent.com/457344ccf07d410f092dcff09de69859abb5a3cfdc14eca212b12bc580d4e189/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f636875636b636d732f6c61726176656c2d636f6e74616374732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/chuckcms/laravel-contacts)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/fd5e572500fbadbed9ebc7a19a8252d5acc5ea6f25d451a813c498d910dcac51/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f636875636b636d732f6c61726176656c2d636f6e74616374732f6261646765732f7175616c6974792d73636f72652e706e673f623d6d61696e)](https://scrutinizer-ci.com/g/chuckcms/laravel-contacts/?branch=main)[![StyleCI](https://camo.githubusercontent.com/01e943063c5f0be227b67bcc78cf252b3fbad9978dc83c8253524e27048a38ec/68747470733a2f2f6769746875622e7374796c6563692e696f2f7265706f732f3430333338333336302f736869656c643f6272616e63683d6d61696e)](https://github.styleci.io/repos/403383360?branch=main)[![Total Downloads](https://camo.githubusercontent.com/0e8070c994bdd2b49710fe74e2d3d58af82e6c29d0062ffdba4340acdaf57511/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f636875636b636d732f6c61726176656c2d636f6e74616374732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/chuckcms/laravel-contacts)

An easy way for attaching contacts to Eloquent models in Laravel. Inspired by the following packages:

- [Lecturize/Laravel-Addresses](https://github.com/Lecturize/Laravel-Addresses)
- [spatie/laravel-permission](https://github.com/spatie/laravel-permission)

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

[](#installation)

Require the package by running

` composer require chuckcms/laravel-contacts`

Publish configuration and migration
-----------------------------------

[](#publish-configuration-and-migration)

`php artisan vendor:publish --provider="Chuckcms\Contacts\ContactsServiceProvider"`

This command will publish a `config/contacts.php` and a migration file.

> You can modify the default fields and their rules by changing both of these files.

After publishing you can run the migrations

`php artisan migrate`

Usage
-----

[](#usage)

You can use the `HasContacts` trait on any model.

```
