PHPackages                             ekremogul/laravel-messaging - 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. ekremogul/laravel-messaging

ActiveLibrary

ekremogul/laravel-messaging
===========================

Messaging package for Laravel

v1.0.1(3y ago)191MITPHPPHP ^8.1

Since Oct 27Pushed 3y ago1 watchersCompare

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

READMEChangelog (1)Dependencies (8)Versions (3)Used By (0)

Messaging package for Laravel
=============================

[](#messaging-package-for-laravel)

[![Latest Version on Packagist](https://camo.githubusercontent.com/7a410360a990345abce64a5fec5e80240efb737d5978a44838a44db4a359ad02/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f656b72656d6f67756c2f6c61726176656c2d6d6573736167696e672e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/ekremogul/laravel-messaging)[![GitHub Tests Action Status](https://camo.githubusercontent.com/c2e008c42a8c12a6c51d991ea5eb6b938c07a889133f1749f00d0620fce7de5c/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f656b72656d6f67756c2f6c61726176656c2d6d6573736167696e672f72756e2d74657374733f6c6162656c3d7465737473)](https://github.com/ekremogul/laravel-messaging/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/73c4248a79054ecbdb5b22eac9539eb737f7240cdbe97d95b6321a53fc37822a/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f776f726b666c6f772f7374617475732f656b72656d6f67756c2f6c61726176656c2d6d6573736167696e672f466978253230504850253230636f64652532307374796c652532306973737565733f6c6162656c3d636f64652532307374796c65)](https://github.com/ekremogul/laravel-messaging/actions?query=workflow%3A%22Fix+PHP+code+style+issues%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/c0ecd99d5c37808da5f3a561629003dcc34aa547fb4f44417dcaf0f2dd5b6cda/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f656b72656d6f67756c2f6c61726176656c2d6d6573736167696e672e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/ekremogul/laravel-messaging)

[![Messaging package for Laravel](https://camo.githubusercontent.com/c37632f6661a8e97ea457f2f8c2cbc0c3e23402fc70e526a7f2f44e0c9d1d87a/68747470733a2f2f62616e6e6572732e6265796f6e64636f2e64652f4c61726176656c2532304d6573736173696e672e706e673f7468656d653d6c69676874267061636b6167654d616e616765723d636f6d706f7365722b72657175697265267061636b6167654e616d653d656b72656d6f67756c2b2532462b6c61726176656c2d6d6573736167696e67267061747465726e3d617263686974656374267374796c653d7374796c655f31266465736372697074696f6e3d4d6573736167696e672b7061636b6167652b666f722b4c61726176656c266d643d312673686f7757617465726d61726b3d3126666f6e7453697a653d313030707826696d616765733d68747470732533412532462532466c61726176656c2e636f6d253246696d672532466c6f676f6d61726b2e6d696e2e737667)](https://packagist.org/packages/ekremogul/laravel-messaging)

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

[](#installation)

You can install the package via composer:

```
composer require ekremogul/laravel-messaging
```

You can publish and run the migrations with:

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

You can publish the config file with:

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

This is the contents of the published config file:

```
return [
    "user_model" => "App\Models\User"
];
```

Usage
-----

[](#usage)

#### Definition

[](#definition)

```
$laravelMessaging = Ekremogul\LaravelMessaging\LaravelMessaging::create();
```

#### Get Inbox

[](#get-inbox)

```
$inbox = $laravelMessaging($order = "desc", $offset = 0, $take = 20); // Retrieve the last 20 messages

foreach($inbox as $item) {
    /*
    * App\Models\User
    * return the messaging user
    */
    $item->withUser;

    /*
    * Ekremogul\LaravelMessaging\Model\Message
    * return last message with user
    */
    $item->message;

    /*
    * Return 0 or 1
    * Returns 1 if there is a message you haven't read
    */
    $item->unreaded_message;

    /*
    * Return integer
    * Returns the total number of unread messages
    */
    $item->total_unread;
}

```

#### Recieve message with user

[](#recieve-message-with-user)

```
$laravelMessaging->getMessagesWithUser($user_id, $offset = 0, $take = 20);

```

#### Send message

[](#send-message)

```
$laravelMessaging->sendMessage($user_id, $message);

```

#### Make seen specific message

[](#make-seen-specific-message)

```
$laravelMessaging->makeSeen($message_id);

```

#### Make specific message seen

[](#make-specific-message-seen)

```
$laravelMessaging->makeSeen($message_id);

```

#### Make all message make with the user seen

[](#make-all-message-make-with-the-user-seen)

```
$laravelMessaging->makeSeenAll($user_id);

```

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

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

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

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

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

[](#security-vulnerabilities)

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

Credits
-------

[](#credits)

- [Ekrem OĞUL](https://github.com/ekremogul)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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 ~0 days

Total

2

Last Release

1293d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/0d79ce4282b6e5f201ab8436a1bcc003236d75057cdbb0d8ad73e2b1d9551a44?d=identicon)[ekremogul](/maintainers/ekremogul)

---

Top Contributors

[![ekremogul](https://avatars.githubusercontent.com/u/4357998?v=4)](https://github.com/ekremogul "ekremogul (12 commits)")

---

Tags

laravelekremogullaravel-messaging

###  Code Quality

TestsPest

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/ekremogul-laravel-messaging/health.svg)

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

###  Alternatives

[vormkracht10/laravel-mails

Laravel Mails can collect everything you might want to track about the mails that has been sent by your Laravel app.

24149.7k](/packages/vormkracht10-laravel-mails)[spatie/laravel-prometheus

Export Laravel metrics to Prometheus

2651.3M6](/packages/spatie-laravel-prometheus)[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)[scalar/laravel

Render your OpenAPI-based API reference

6183.9k2](/packages/scalar-laravel)[ralphjsmit/laravel-helpers

A package containing handy helpers for your Laravel-application.

13704.6k2](/packages/ralphjsmit-laravel-helpers)[musahmusah/laravel-multipayment-gateways

A Laravel Package that makes implementation of multiple payment Gateways endpoints and webhooks seamless

852.2k1](/packages/musahmusah-laravel-multipayment-gateways)

PHPackages © 2026

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