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

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

trvmsg/messenger
================

Simple user messaging tool for Laravel

2.14.5(8y ago)053MITPHPPHP &gt;=5.4.0

Since Nov 21Pushed 8y ago1 watchersCompare

[ Source](https://github.com/trinca/trvmsg)[ Packagist](https://packagist.org/packages/trvmsg/messenger)[ RSS](/packages/trvmsg-messenger/feed)WikiDiscussions master Synced 4w ago

READMEChangelog (4)Dependencies (8)Versions (51)Used By (0)

[![Build Status](https://camo.githubusercontent.com/47ac9d345e134c4b576c68d5ac7db4978879224708535172f338bd453b186017/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f7472766d73672f6c61726176656c2d6d657373656e6765722f76322e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/trvmsg/laravel-messenger)[![Code Climate](https://camo.githubusercontent.com/93291d1545785b93367cd1db83ab9664bfeea63262beb43105e1f007f260bf74/68747470733a2f2f696d672e736869656c64732e696f2f636f6465636c696d6174652f6769746875622f7472766d73672f6c61726176656c2d6d657373656e6765722e7376673f7374796c653d666c61742d737175617265)](https://codeclimate.com/github/trvmsg/laravel-messenger)[![Latest Version](https://camo.githubusercontent.com/c47f1d94ce80bef861b87f9cb634db86eccd0fa38921d4c4941d8adedd7d3a0c/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f7472766d73672f6c61726176656c2d6d657373656e6765722e7376673f7374796c653d666c61742d737175617265)](https://github.com/trvmsg/laravel-messenger/releases)[![Total Downloads](https://camo.githubusercontent.com/404604c0f6ac39ae79022565df962e740bb3e24cafacfa27c8259a0c057e50d1/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7472766d73672f6d657373656e6765722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/trvmsg/messenger)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE)

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 acess 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)

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

[](#installation-laravel-5x)

In composer.json:

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

```

Run:

```
composer update

```

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

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

```

Publish Assets

```
php artisan vendor:publish --provider="Trvmsg\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, simply use [this example](https://github.com/trvmsg/laravel-messenger/blob/v2/src/Trvmsg/Messenger/examples/create_users_table.php) as a starting point, then migrate.

Migrate your database:

```
php artisan migrate

```

Add the trait to your user model:

```
use Trvmsg\Messenger\Traits\Messagable;

class User extends Model {
	use Messagable;
}

```

Examples
--------

[](#examples)

- [Controller](https://github.com/trvmsg/laravel-messenger/blob/v2/src/Trvmsg/Messenger/examples/MessagesController.php)
- [Routes](https://github.com/trvmsg/laravel-messenger/blob/v2/src/Trvmsg/Messenger/examples/routes.php)
- [Views](https://github.com/trvmsg/laravel-messenger/tree/v2/src/Trvmsg/Messenger/examples/views)

**Note:** These examples use the [laravelcollective/html](http://laravelcollective.com/docs/5.0/html) package that is no longer included in Laravel 5 out of the box. Make sure you require this dependency in your `composer.json` file if you intend to use the example files.

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

[](#example-projects)

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

Security
--------

[](#security)

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

Credits
-------

[](#credits)

- [Chris Gmyr](https://github.com/trvmsg)
- [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 66% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community17

Small or concentrated contributor base

Maturity71

Established project with proven stability

 Bus Factor1

Top contributor holds 81.3% 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 ~20 days

Total

49

Last Release

3271d 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

### Community

Maintainers

![](https://www.gravatar.com/avatar/2992fd2277ec3fb74e2c121c42b1e632a079b8ef9b064270854460362e862f72?d=identicon)[trive](/maintainers/trive)

---

Top Contributors

[![cmgmyr](https://avatars.githubusercontent.com/u/4693481?v=4)](https://github.com/cmgmyr "cmgmyr (200 commits)")[![antonkomarev](https://avatars.githubusercontent.com/u/1849174?v=4)](https://github.com/antonkomarev "antonkomarev (12 commits)")[![trinca](https://avatars.githubusercontent.com/u/5479847?v=4)](https://github.com/trinca "trinca (11 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)")[![ognjenm](https://avatars.githubusercontent.com/u/609541?v=4)](https://github.com/ognjenm "ognjenm (2 commits)")[![UnrulyNatives](https://avatars.githubusercontent.com/u/6769986?v=4)](https://github.com/UnrulyNatives "UnrulyNatives (1 commits)")[![DODMax](https://avatars.githubusercontent.com/u/1137276?v=4)](https://github.com/DODMax "DODMax (1 commits)")[![Raou1d](https://avatars.githubusercontent.com/u/6343069?v=4)](https://github.com/Raou1d "Raou1d (1 commits)")[![adamwathan](https://avatars.githubusercontent.com/u/4323180?v=4)](https://github.com/adamwathan "adamwathan (1 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)")

---

Tags

laravelmessagingMessengeruser messaging

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

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

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

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3345.1M337](/packages/psalm-plugin-laravel)[cmgmyr/messenger

Simple user messaging tool for Laravel

2.6k2.5M6](/packages/cmgmyr-messenger)[laravel/pulse

Laravel Pulse is a real-time application performance monitoring tool and dashboard for your Laravel application.

1.7k14.1M124](/packages/laravel-pulse)[flarum/core

Delightfully simple forum software.

201.4M2.2k](/packages/flarum-core)[api-platform/laravel

API Platform support for Laravel

59156.3k11](/packages/api-platform-laravel)[lexxyungcarter/chatmessenger

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

10525.0k](/packages/lexxyungcarter-chatmessenger)

PHPackages © 2026

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