PHPackages                             finller/laravel-conversations - 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. finller/laravel-conversations

Abandoned → [elegantly/laravel-conversations](/?search=elegantly%2Flaravel-conversations)Library[Utility &amp; Helpers](/categories/utility)

finller/laravel-conversations
=============================

Attach chat to any model

v1.3.0(1mo ago)19.9k[2 PRs](https://github.com/ElegantEngineeringTech/laravel-conversations/pulls)MITPHPPHP ^8.1CI passing

Since Aug 17Pushed 1mo agoCompare

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

READMEChangelog (10)Dependencies (24)Versions (36)Used By (0)

Attach a conversation to any model and easily create a chat
===========================================================

[](#attach-a-conversation-to-any-model-and-easily-create-a-chat)

[![Latest Version on Packagist](https://camo.githubusercontent.com/8eee07e21b9a9298214eb09ed8c18c8b39ded02c7e5707cdb4bc4ed816d58ba9/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f656c6567616e746c792f6c61726176656c2d636f6e766572736174696f6e732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/elegantly/laravel-conversations)[![Tests](https://camo.githubusercontent.com/c46477deb6d98dfd98353595614eb6ab1eaf400d0983aef580114432b3125b77/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f456c6567616e74456e67696e656572696e67546563682f6c61726176656c2d636f6e766572736174696f6e732f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/ElegantEngineeringTech/laravel-conversations/actions?query=workflow%3Arun-tests+branch%3Amain)[![Code Style](https://camo.githubusercontent.com/a2f6b1151344868c832c036ba6e88c9fc43447e45f934da312e8cf2e977694ae/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f456c6567616e74456e67696e656572696e67546563682f6c61726176656c2d636f6e766572736174696f6e732f6669782d7068702d636f64652d7374796c652d6973737565732e796d6c3f6272616e63683d6d61696e266c6162656c3d636f64652532307374796c65267374796c653d666c61742d737175617265)](https://github.com/ElegantEngineeringTech/laravel-conversations/actions?query=workflow%3A%22Fix+PHP+code+style+issues%22+branch%3Amain)[![PHPStan Level](https://camo.githubusercontent.com/5ef89a3a5ca9550000364e01295544356ca50d77b618a243334b10b5d22f62fd/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f456c6567616e74456e67696e656572696e67546563682f6c61726176656c2d636f6e766572736174696f6e732f7068707374616e2e796d6c3f6c6162656c3d7068707374616e267374796c653d666c61742d737175617265)](https://github.com/ElegantEngineeringTech/laravel-conversations/actions?query=workflow%3Aphpstan)[![Laravel Pint](https://camo.githubusercontent.com/26d50bd1bb559b3b35976dc92e06ad205a26bcc1c7e85bf0349ae6eb4f4141b4/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f456c6567616e74456e67696e656572696e67546563682f6c61726176656c2d636f6e766572736174696f6e732f70696e742e796d6c3f6c6162656c3d6c61726176656c25323070696e74267374796c653d666c61742d737175617265)](https://github.com/ElegantEngineeringTech/laravel-conversations/actions?query=workflow%3Apint)[![Total Downloads](https://camo.githubusercontent.com/37b7f5e759175299e281d4d812b75a06621276d0a69791433217ac2bf3f34dd1/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f656c6567616e746c792f6c61726176656c2d636f6e766572736174696f6e732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/elegantly/laravel-conversations)

This package the basic architecture of a chat between multiple users.

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

[](#installation)

You can install the package via composer:

```
composer require elegantly/laravel-conversations
```

You can publish and run the migrations with:

```
php artisan vendor:publish --tag="conversations-migrations"
php artisan migrate
```

You can publish the config file with:

```
php artisan vendor:publish --tag="conversations-config"
```

This is the contents of the published config file:

```
return [

    /**
     * The Model used with the user_id and owner_id
     */
    'model_user' => User::class,

    'model_message' => Message::class,

    'model_conversation' => Conversation::class,

    /**
     * When a User is deleted, his messages will be deleted
     */
    'cascade_user_delete_to_messages' => false,

    /**
     * When a User is deleted, his messages will be deleted
     */
    'cascade_conversation_delete_to_messages' => false,

    /**
     * When the parent of a conversation is deleted, the conversation is deleted
     */
    'cascade_conversationable_delete_to_conversation' => false,
];
```

Usage
-----

[](#usage)

### 1. Create the conversation

[](#1-create-the-conversation)

```
$conversation = new Conversation();

$conversation->conversationable()->associate($mission); // optional

$conversation->save();

$conversation->users()->sync($usersIds);
```

### 2. Save messages in the conversation

[](#2-save-messages-in-the-conversation)

```
$message = new Message([
    'content' => "My message",
]);

$message->user()->associate($this->user);

$this->conversation->messages()->save($message);
```

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

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

[](#contributing)

Please see [CONTRIBUTING](https://github.com/quentinGab/.github/blob/main/CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [Quentin Gabriele](https://github.com/quentinGab)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

50

—

FairBetter than 95% of packages

Maintenance92

Actively maintained with recent releases

Popularity20

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor1

Top contributor holds 79.5% 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 ~44 days

Recently: every ~96 days

Total

31

Last Release

37d ago

Major Versions

v0.5.3 → 1.0.02025-02-05

### Community

Maintainers

![](https://www.gravatar.com/avatar/d769563728757858e249f266ac2555f28db5640124df92821ed17d93ee76fc7b?d=identicon)[QuentinGab](/maintainers/QuentinGab)

---

Top Contributors

[![QuentinGab](https://avatars.githubusercontent.com/u/40128136?v=4)](https://github.com/QuentinGab "QuentinGab (105 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (24 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (3 commits)")

---

Tags

laravelchatElegantlylaravel-conversations

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/finller-laravel-conversations/health.svg)

```
[![Health](https://phpackages.com/badges/finller-laravel-conversations/health.svg)](https://phpackages.com/packages/finller-laravel-conversations)
```

###  Alternatives

[spatie/laravel-data

Create unified resources and data transfer objects

1.7k28.9M626](/packages/spatie-laravel-data)[hirethunk/verbs

An event sourcing package that feels nice.

513162.9k6](/packages/hirethunk-verbs)[worksome/exchange

Check Exchange Rates for any currency in Laravel.

123544.7k](/packages/worksome-exchange)[ralphjsmit/livewire-urls

Get the previous and current url in Livewire.

82270.3k4](/packages/ralphjsmit-livewire-urls)[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)[ralphjsmit/laravel-helpers

A package containing handy helpers for your Laravel-application.

13704.6k2](/packages/ralphjsmit-laravel-helpers)

PHPackages © 2026

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