alisarwar/chat-system

Real Time Chat System in Laravel using php pusher

Package info

github.com/artisanmuhammadali/chat-system

Language:CSS

pkg:composer/alisarwar/chat-system

Statistics

Installs: 10

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

dev-main 2023-07-12 16:21 UTC

Requires (Dev)

None

Suggests

None

Provides

None

Conflicts

None

Replaces

None

MIT 5b750608170e0f08579c49ccc3363b35c7c102ae

  • Muhammad Ali <alibinsarwar2001.woop@gmail.com>

This package is auto-updated.

Last update: 2026-06-29 02:13:39 UTC


README

A chat system package for Laravel that enables users to chat with each other using Pusher PHP server. This Package provide you Echosystem ( Event , Controller , Migrations , Models , Views ) which enable your application to start conversatation between two users.

👁 Status
👁 GitHub Issues
👁 GitHub Pull Requests

Preview

👁 Chat System Preview

Requirements

This package requires the following dependencies:

  • User Authentication System ( Breeze , Jetstream , Custom )
  • Pusher PHP server
  • Pusher API keys and secret keys (obtained from your Pusher account)

Features

  • Communication through private channel
  • Support Conversation Between two Users
  • Dark Theme for Chat System

Installation

  1. Make sure you have a Pusher keys if you don't have then get them by login to Pusher Dashboard and then create new APP , and install Pusher PHP Server For authentication preffer to install Laravel Breeze package in your Laravel application.

  2. Run the following command to install the Laravel Chat System package:

    composer require alisarwar/chat-system:dev-main
  3. This package provide you Event , Controller , Migrations , Models , Views these things create an echo-system to implement chat system in you application

  4. Add Routes to your web.php

     # veiw all available users to start conversation
     Route::get('/message',[MessageController::class , 'message'])->name('message');
     # open chat of specfic user
     Route::get('/chat/{slug?}',[MessageController::class , 'chat'])->name('chat');
     # broadcast message to channel
     Route::post('/broadcast', [MessageController::class , 'broadcast'])->name('broadcast');
     # receive message from channel
     Route::post('/receive', [MessageController::class , 'receive'])->name('receive');
     # authenticate private channel
     Route::post('/pusher/auth', [MessageController::class , 'auth'])->name('pusher.auth');
  5. Update your .env

     BROADCAST_DRIVER=pusher
    
     PUSHER_APP_ID={YOUR_PUSHER_APP_ID}
     PUSHER_APP_KEY={YOUR_PUSHER_APP_KEY}
     PUSHER_APP_SECRET={YOUR_PUSHER_APP_SECRET}
     PUSHER_HOST=
     PUSHER_PORT=443
     PUSHER_SCHEME=https
     PUSHER_APP_CLUSTER={YOUR_PUSHER_APP_CLUSTER}
  6. Migrate and Server Your Application

     php artisan migrate
     php artisan serve
  7. Register Users and start conversation by going to /message

Contributing

Contributions are welcome! If you encounter any issues or have suggestions for improvements, please open an issue or submit a pull request on the GitHub repository.