PHPackages                             dedyyyy/messenger - 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. dedyyyy/messenger

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

dedyyyy/messenger
=================

Simple user messaging tool for Laravel

2.19(7y ago)024MITPHPPHP ^7.1.3

Since Nov 21Pushed 7y agoCompare

[ Source](https://github.com/dedyyyy/laravel-messenger-mongodb)[ Packagist](https://packagist.org/packages/dedyyyy/messenger)[ RSS](/packages/dedyyyy-messenger/feed)WikiDiscussions master Synced today

READMEChangelog (2)Dependencies (7)Versions (54)Used By (0)

[![Build Status](https://camo.githubusercontent.com/2e3c673a8bf51e9d1e657aa812d10b02487aa62e8ba29f3bb19e8803766d9eb3/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f636d676d79722f6c61726176656c2d6d657373656e6765722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/cmgmyr/laravel-messenger)[![Scrutinizer](https://camo.githubusercontent.com/25d90e84554462042182395fba64af6244e92102ba14f9496e6eb31493619370/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f636d676d79722f6c61726176656c2d6d657373656e6765722e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/cmgmyr/laravel-messenger/)[![Scrutinizer Coverage](https://camo.githubusercontent.com/f6d0ac033651e6c7a97a0152f5d8956fcd40c8ee48ca5227ce29c0a5ca099922/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f636d676d79722f6c61726176656c2d6d657373656e6765722e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/cmgmyr/laravel-messenger/)[![Latest Version](https://camo.githubusercontent.com/d3ad6787c1a60322e101b0730bd6c3098981e1f70b28701b742c101ca4eddff1/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f636d676d79722f6c61726176656c2d6d657373656e6765722e7376673f7374796c653d666c61742d737175617265)](https://github.com/cmgmyr/laravel-messenger/releases)[![Total Downloads](https://camo.githubusercontent.com/e7b13f89c9efc910b48e6c175ecd60e9692b06018ef0152b8c431f6685c1ad8c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f636d676d79722f6d657373656e6765722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/cmgmyr/messenger)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE)[![Get help on Codementor](https://camo.githubusercontent.com/946849bf79fb5d17765232b1fe38f4184923e7d4e532bcb028dd14b2b26ecc52/68747470733a2f2f63646e2e636f64656d656e746f722e696f2f6261646765732f6765745f68656c705f6769746875622e737667)](https://www.codementor.io/cmgmyr)

Laravel Messenger
=================

[](#laravel-messenger)

This package will allow you to add a full user messaging system into your Laravel application.

Leave some feedback
-------------------

[](#leave-some-feedback)

[How are you using laravel-messenger?](https://github.com/cmgmyr/laravel-messenger/issues/55)

Features
--------

[](#features)

- Multiple conversations per user
- Optionally loop in additional users with each new message
- View the last message for each thread available
- Returns either all messages in the system, all messages associated to the user, or all message associated to the user with new/unread messages
- Return the users unread message count easily
- Very flexible usage so you can implement your own access control

Common uses
-----------

[](#common-uses)

- Open threads (everyone can see everything)
- Group messaging (only participants can see their threads)
- One to one messaging (private or direct thread)

Laravel Versions
----------------

[](#laravel-versions)

LaravelMessenger4.\*1.\*5.0-5.4&lt;= 2.16.25.5+2.\*Installation (Laravel 4.x - no longer actively supported)
---------------------------------------------------------

[](#installation-laravel-4x---no-longer-actively-supported)

Installation instructions for Laravel 4 can be [found here](https://github.com/cmgmyr/laravel-messenger/tree/v1).

Installation (Laravel 5.x)
--------------------------

[](#installation-laravel-5x)

```
composer require cmgmyr/messenger

```

Or place manually in composer.json:

```
"require": {
    "cmgmyr/messenger": "~2.0"
}

```

Run:

```
composer update

```

Add the service provider to `config/app.php` under `providers`:

```
'providers' => [
    Cmgmyr\Messenger\MessengerServiceProvider::class,
],
```

> **Note**: If you are using Laravel 5.5, this step is unnecessary. Laravel Messenger supports [Package Discovery](https://laravel.com/docs/5.5/packages#package-discovery).

Publish config:

```
php artisan vendor:publish --provider="Cmgmyr\Messenger\MessengerServiceProvider" --tag="config"

```

Update config file to reference your User Model:

```
config/messenger.php

```

Create a `users` table if you do not have one already. If you need one, the default Laravel migration will be satisfactory.

**(Optional)** Define names of database tables in package config file if you don't want to use default ones:

```
'messages_table' => 'messenger_messages',
'participants_table' => 'messenger_participants',
'threads_table' => 'messenger_threads',
```

Publish migrations:

```
php artisan vendor:publish --provider="Cmgmyr\Messenger\MessengerServiceProvider" --tag="migrations"

```

Migrate your database:

```
php artisan migrate

```

Add the trait to your user model:

```
use Cmgmyr\Messenger\Traits\Messagable;

class User extends Authenticatable {
    use Messagable;
}
```

Examples
--------

[](#examples)

- [Controller](https://github.com/cmgmyr/laravel-messenger/tree/master/examples/MessagesController.php)
- [Routes](https://github.com/cmgmyr/laravel-messenger/tree/master/examples/routes.php)
- [Views](https://github.com/cmgmyr/laravel-messenger/tree/master/examples/views)

Example Projects
----------------

[](#example-projects)

- \[WIP\] [Pusher](https://github.com/cmgmyr/laravel-messenger-pusher-demo)
- \[WIP\] [Lumen API](https://github.com/cmgmyr/lumen-messenger-api)

Contributing?
-------------

[](#contributing)

Please format your code before creating a pull-request. This will format all files as specified in `.php_cs`:

```
vendor/bin/php-cs-fixer fix .

```

Security
--------

[](#security)

If you discover any security related issues, please email [Chris Gmyr](mailto:cmgmyr@gmail.com) instead of using the issue tracker.

Credits
-------

[](#credits)

- [Chris Gmyr](https://github.com/cmgmyr)
- [Anton Komarev](https://github.com/antonkomarev)
- [All Contributors](../../contributors)

### Special Thanks

[](#special-thanks)

This package used [AndreasHeiberg/laravel-messenger](https://github.com/AndreasHeiberg/laravel-messenger) as a starting point.

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity72

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 ~31 days

Recently: every ~68 days

Total

52

Last Release

2612d ago

Major Versions

1.7.1 → 2.82015-09-27

1.8 → 2.8.12015-10-06

1.8.1 → 2.92015-12-11

1.8.2 → 2.9.12016-01-29

v1.x-dev → 2.102016-02-25

PHP version history (3 changes)1.0PHP &gt;=5.4.0

2.15PHP &gt;=5.5.0

v2.x-devPHP ^7.1.3

### Community

Maintainers

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

---

Top Contributors

[![cmgmyr](https://avatars.githubusercontent.com/u/4693481?v=4)](https://github.com/cmgmyr "cmgmyr (245 commits)")[![antonkomarev](https://avatars.githubusercontent.com/u/1849174?v=4)](https://github.com/antonkomarev "antonkomarev (29 commits)")[![dedyks](https://avatars.githubusercontent.com/u/23741665?v=4)](https://github.com/dedyks "dedyks (7 commits)")[![pascalbaljet](https://avatars.githubusercontent.com/u/8403149?v=4)](https://github.com/pascalbaljet "pascalbaljet (6 commits)")[![danbalarin](https://avatars.githubusercontent.com/u/8071168?v=4)](https://github.com/danbalarin "danbalarin (3 commits)")[![A5hleyRich](https://avatars.githubusercontent.com/u/1422996?v=4)](https://github.com/A5hleyRich "A5hleyRich (2 commits)")[![anhskohbo](https://avatars.githubusercontent.com/u/1529454?v=4)](https://github.com/anhskohbo "anhskohbo (2 commits)")[![gamemovies](https://avatars.githubusercontent.com/u/3316843?v=4)](https://github.com/gamemovies "gamemovies (2 commits)")[![kenzouno1](https://avatars.githubusercontent.com/u/1946802?v=4)](https://github.com/kenzouno1 "kenzouno1 (2 commits)")[![ognjenm](https://avatars.githubusercontent.com/u/609541?v=4)](https://github.com/ognjenm "ognjenm (2 commits)")[![tzookb](https://avatars.githubusercontent.com/u/3749973?v=4)](https://github.com/tzookb "tzookb (1 commits)")[![mickaelandrieu](https://avatars.githubusercontent.com/u/1247388?v=4)](https://github.com/mickaelandrieu "mickaelandrieu (1 commits)")[![nikolaynesov](https://avatars.githubusercontent.com/u/17743574?v=4)](https://github.com/nikolaynesov "nikolaynesov (1 commits)")[![UnrulyNatives](https://avatars.githubusercontent.com/u/6769986?v=4)](https://github.com/UnrulyNatives "UnrulyNatives (1 commits)")[![adamwathan](https://avatars.githubusercontent.com/u/4323180?v=4)](https://github.com/adamwathan "adamwathan (1 commits)")[![DODMax](https://avatars.githubusercontent.com/u/1137276?v=4)](https://github.com/DODMax "DODMax (1 commits)")[![fridzema](https://avatars.githubusercontent.com/u/8180660?v=4)](https://github.com/fridzema "fridzema (1 commits)")[![Raou1d](https://avatars.githubusercontent.com/u/6343069?v=4)](https://github.com/Raou1d "Raou1d (1 commits)")

---

Tags

laravelmessagingMessengeruser messaging

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/dedyyyy-messenger/health.svg)

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

###  Alternatives

[cmgmyr/messenger

Simple user messaging tool for Laravel

2.6k2.4M6](/packages/cmgmyr-messenger)[barryvdh/laravel-ide-helper

Laravel IDE Helper, generates correct PHPDocs for all Facade classes, to improve auto-completion.

14.9k123.0M687](/packages/barryvdh-laravel-ide-helper)[psalm/plugin-laravel

Psalm plugin for Laravel

3274.9M308](/packages/psalm-plugin-laravel)[lexxyungcarter/chatmessenger

Simple one-to-one/group chat messaging tool for Laravel 5, 6, 7, 8, 9 &amp; 10 with Pusher Integration

10724.1k](/packages/lexxyungcarter-chatmessenger)[syntaxlexx/chatmessenger

Simple one-to-one/group chat messaging tool for Laravel 5, 6, 7, 8, 9 &amp; 10 with Pusher Integration

10510.2k](/packages/syntaxlexx-chatmessenger)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

255.2k](/packages/aedart-athenaeum)

PHPackages © 2026

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