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

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

bushart/laravel-messenger
=========================

A package for Laravel PHP Framework to add a complete real-time chat system.

1.4(2y ago)123MITJavaScript

Since Jan 2Pushed 2y ago1 watchersCompare

[ Source](https://github.com/busharthussain/laravel-messenger)[ Packagist](https://packagist.org/packages/bushart/laravel-messenger)[ Docs](https://github.com/busharthussain/laravel-messenger)[ RSS](/packages/bushart-laravel-messenger/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (2)Versions (6)Used By (0)

[![Laravel Messenger](/art/preview.jpg)](/art/preview.jpg)

Laravel Messenger
-----------------

[](#laravel-messenger)

Laravel's #1 one-to-one chatting system package, helps you add a complete real-time chatting system to your new/existing Laravel application with only one command.

Need a Help? 📣
--------------

[](#need-a-help-)

I have created a server for *Laravel Messenger* on `Discord` to let you *up-to-date* and help you as much as I can .. so now you can chat with me, get a help, showcases, and most importantly to get announcements and updates about *Laravel Messenger*.

So,  and keep updated.

Features
--------

[](#features)

- One-to-one users chat system.
- Real-time contact list updates.
- Search functionality.
- Contact item's last message indicator (e.g. You: ....).
- Real-time message seen indicator.
- Upload attachments.
- Upload attachments to public, Google and Amazon aws S3 bucket. (By default it is public, you can update it in the config file)
- Send Emoji's.
- Delete Messages and chat
- Responsive design with all devices. with simple and wonderful UI design.

...and much more you have to discover it yourself.

### Documentation

[](#documentation)

- [Installation](#installation)
- [Configuration](#configuration)
- [Generators](#generators)

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

[](#installation)

#### Step 1: Install Laravel

[](#step-1-install-laravel)

This is optional; however, if you have not created the laravel app, then you may go ahead and execute the below command:

```
composer create-project laravel/laravel example-app

```

#### Step 2: Setup Database Configuration

[](#step-2-setup-database-configuration)

After successfully installing the laravel app then after configuring the database setup. We will open the ".env" file and change the database name, username and password in the env file.

```
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=Enter_Your_Database_Name
DB_USERNAME=Enter_Your_Database_Username
DB_PASSWORD=Enter_Your_Database_Password

```

#### Step 3: Install Auth Scaffold

[](#step-3-install-auth-scaffold)

Install Laravel breeze for quick auth start up

```
composer require laravel/breeze --dev

```

After Composer has installed the Laravel Breeze package, you may run the `breeze:install` Artisan command. This command publishes the authentication views, routes, controllers, and other resources to your application. Laravel Breeze publishes all of its code to your application so that you have full control and visibility over its features and implementation.

The `breeze:install` command will prompt you for your preferred frontend stack and testing framework:

```
php artisan breeze:install

php artisan migrate

npm install

npm run dev

```

### Package Installation

[](#package-installation)

Add the package in your composer.json by executing the following command.

```
composer require bushart/laravel-messenger

```

This will install the [Pusher](https://pusher.com/) package too.

So update the .env file.

```
BROADCAST_DRIVER=log to BROADCAST_DRIVER=pusher

PUSHER_APP_ID="Pusher App Id"
PUSHER_APP_KEY="Pusher provided app key"
PUSHER_APP_SECRET="Pusher provided app secret"
PUSHER_APP_CLUSTER="The app cluster you select on creating app on pusher"

```

#### Install Messenger

[](#install-messenger)

All you need is to run the following command to setup everything for you:

```
php artisan messenger:install

```

This command will automatically do the following:

- Some configurations.
- Publishing the assets (config, views, assets, models, migrations).

#### Migration

[](#migration)

Run the following command to run the migrations.

```
php artisan migrate

```

After installing the package, you can access the messenger by the default path(routes prefix) which is /messenger, and you can change path name in the config file config/messenger.php as mentioned in the configurations below.

\##Configurations

You can find package's configuration file at config/messenger.php in your application, and will find the following properties that you can modify inside it:

#### Display Name

[](#display-name)

This value is the name for the messenger displayed in the UI

```
'name' => env('MESSENGER_NAME', 'Laravel Messenger'),

```

#### Files upload disk

[](#files-upload-disk)

- Define the default storage disk for file uploads:
- Set to 'google' or 's3' to use Google Cloud Storage or Amazon S3 respectively,
- or leave as 'public' to use the default local filesystem storage.

```
'storage_disk_name' => env('MESSENGER_STORAGE_DISK', 'public'),

```

If you want to use Google to upload files. You will have to install the google cloud to your project.

```
composer require google/cloud-storage

```

If you want to use AWS S3 for upload file. You will have to install the aws s3 sdk to your project.

```
composer require league/flysystem-aws-s3-v3

```

#### File Icons Configuration (Excluding Images and Videos)

[](#file-icons-configuration-excluding-images-and-videos)

Define file extensions and their respective icons to display for uploaded files (excluding images and videos).

```
'file_icons' => [
           'pdf' => 'far fa-file-pdf',
           'doc' => 'far fa-file-word',
           'docx' => 'far fa-file-word',
           'xls' => 'far fa-file-excel',
           'xlsx' => 'far fa-file-excel',
           'ppt' => 'far fa-file-powerpoint',
           'pptx' => 'far fa-file-powerpoint',
           'txt' => 'far fa-file-alt',
           'csv' => 'far fa-file-csv',
           'ai' => 'far fa-file-illustrator',
           'psd' => 'far fa-file-photoshop',
           'zip' => 'far fa-file-archive',
           'rar' => 'far fa-file-archive',
           // Add more file extensions and their corresponding icons here
       ],

```

#### Routes' Configurations

[](#routes-configurations)

This value is package's routes' configuration

```
'routes' => [
        'prefix' => env('MESSENGER_ROUTES_PREFIX', 'messenger'),
        'middleware' => env('MESSENGER_ROUTES_MIDDLEWARE', ['web','auth']),
        'namespace' => env('MESSENGER_ROUTES_NAMESPACE', 'bushart\messenger\Http\Controllers'),
    ],

```

`prefix` is the prefix of the routes in this package, so you can access the messenger from this value by going to `/messenger`.

#### Pusher configurations

[](#pusher-configurations)

From here you can change pusher's configurations,

```
'pusher' => [
        'debug' => env('APP_DEBUG', false),
        'key' => env('PUSHER_APP_KEY'),
        'secret' => env('PUSHER_APP_SECRET'),
        'app_id' => env('PUSHER_APP_ID'),
        'options' => [
            'cluster' => env('PUSHER_APP_CLUSTER'),
            'encrypted' => env('PUSHER_APP_USETLS'),
        ],
    ],

```

Customizations
--------------

[](#customizations)

You may want to do your own customizations and modifications on the code such as the views or the controllers to add a new feature. so, all you need is to publish the required asset mentioned below and start your own customizations!

#### Package's assets

[](#packages-assets)

- `config`
- `views`
- `assets(css,js,images, libs)`
- `models`
- `migrations`
- `controllers`

The following assets already been published during the installation process: config, views, assets, models, migrations only the controllers asset is not published until you do.

#### Publishing the assets

[](#publishing-the-assets)

When you need to publish an asset, all you need is to run the following command :

`php artisan vendor:publish --tag=messenger-`

###### Change with the required asset name (e.g. css) to be like messenger-css

[](#change-with-the-required-asset-name-eg-css-to-be-like-messenger-css)

#### Controllers

[](#controllers)

You may want to do some modifications on the controllers of this package, so you need to follow the steps below:

1. Publish `controllers` asset

`php artisan vendor:publish --tag=messenger-controllers`

2. Go to config/messenger.php and from routes properties, change namespace to App\\Http\\Controllers\\Bushart\\Messenger to be like the following:

```
config/messenger.php

...
 'namespace' => env('MESSENGER_ROUTES_NAMESPACE', 'bushart\messenger\Http\Controllers'),

```

3. Go to app\\Http\\Controllers\\Bushart\\Messenger and open MessengerController.php with your code editor .. then change the namespace to the same namespace specified in the step 2 above ..

That's all you need to do.

Now, You can work with package's controller and start your modifications.

Upgrading Messenger
-------------------

[](#upgrading-messenger)

When upgrading to any new Chatify version, you should re-publish Messenger's assets:

`php artisan messenger:publish`

To keep the assets up-to-date and avoid issues in future updates, you may add the messenger:publish command to the post-update-cmd scripts in your application's `composer.json file`:

```
composer.json

{
    "scripts": {
        "post-update-cmd": [
            "@php artisan messenger:publish --ansi"
        ]
    }
}

```

Author
------

[](#author)

- [Bushart Hussain](https://www.kiswatech.com)

License
-------

[](#license)

Laravel Messenger is licensed under the

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity46

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

5

Last Release

867d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/7c8f197be03f87ca7ebfb567da963b7310d8cf259148758fac79345b24a567f1?d=identicon)[busharthussain](/maintainers/busharthussain)

---

Top Contributors

[![busharthussain](https://avatars.githubusercontent.com/u/12028370?v=4)](https://github.com/busharthussain "busharthussain (5 commits)")

---

Tags

phplaravelreal-timepusherrealtimechatMessengerconversations

### Embed Badge

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

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

###  Alternatives

[munafio/chatify

A package for Laravel PHP Framework to add a complete real-time chat system.

2.4k441.9k2](/packages/munafio-chatify)[nahid/talk

Talk is a Laravel based realtime messaging, chatting and conversation system. It helps to develop users messaging, chatting and conversations in easy way.

1.6k58.1k4](/packages/nahid-talk)[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)[baklysystems/laravel-chat-messenger

Laravel chat package

121.8k](/packages/baklysystems-laravel-chat-messenger)

PHPackages © 2026

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