PHPackages                             nnixon/laravel-simple-realtime-chat - 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. nnixon/laravel-simple-realtime-chat

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

nnixon/laravel-simple-realtime-chat
===================================

A simple realtime chat package for Laravel

v1.0.0(1y ago)03MITPHPPHP ^8.0

Since Mar 4Pushed 1y ago1 watchersCompare

[ Source](https://github.com/NNixon/laravel-simple-realtime-chat)[ Packagist](https://packagist.org/packages/nnixon/laravel-simple-realtime-chat)[ RSS](/packages/nnixon-laravel-simple-realtime-chat/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (1)Versions (2)Used By (0)

Laravel Simple Realtime Chat
============================

[](#laravel-simple-realtime-chat)

A lightweight package for adding realtime chat functionality to your Laravel application.

Features
--------

[](#features)

- One-on-one private conversations
- Group chat support
- Realtime message updates with Pusher
- Read status tracking
- User search functionality
- Responsive UI with TailwindCSS

Requirements
------------

[](#requirements)

- PHP 8.0+
- Laravel 8.0+
- Pusher account for realtime functionality

Prerequisites
-------------

[](#prerequisites)

Before installing this package, make sure to set up authentication and required dependencies:

```
# Install Laravel Breeze for authentication
composer require laravel/breeze
php artisan breeze:install

# Install Pusher PHP Server
composer require pusher/pusher-php-server

# Install npm dependencies
npm install

# Install required JavaScript packages
npm install lodash laravel-echo pusher-js
```

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

[](#installation)

1. Install the package via composer:

```
composer require nnixon/laravel-simple-realtime-chat
```

2. Publish the package files:

```
php artisan realtime-chat:publish
```

3. Run the migrations:

```
php artisan migrate
```

4. Uncomment the BroadcastServiceProvider in `config/app.php`:

```
// Uncomment this line in the providers array
App\Providers\BroadcastServiceProvider::class,
```

5. Update your `.env` file with Pusher credentials:

```
BROADCAST_DRIVER=pusher
PUSHER_APP_ID=your-app-id
PUSHER_APP_KEY=your-app-key
PUSHER_APP_SECRET=your-app-secret
PUSHER_APP_CLUSTER=your-app-cluster

VITE_PUSHER_APP_KEY="${PUSHER_APP_KEY}"
VITE_PUSHER_APP_CLUSTER="${PUSHER_APP_CLUSTER}"

```

6. Update your `routes/channels.php` file with the following code:

```
