https://github.com/m-media-group/le-chat
Add Chat to your Laravel App
https://github.com/m-media-group/le-chat
Last synced: about 2 months ago
JSON representation
Add Chat to your Laravel App
- Host: GitHub
- URL: https://github.com/m-media-group/le-chat
- Owner: M-Media-Group
- License: mit
- Created: 2025-04-30T18:38:50.000Z (5 months ago)
- Default Branch: main
- Last Pushed: 2025-08-05T04:20:48.000Z (2 months ago)
- Last Synced: 2025-08-10T01:24:28.461Z (about 2 months ago)
- Language: PHP
- Homepage: https://laravelchat.netlify.app/
- Size: 1.97 MB
- Stars: 47
- Watchers: 3
- Forks: 2
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Funding: .github/FUNDING.yml
- License: LICENSE.md
Awesome Lists containing this project
README
# Le Chat
**Le Chat** adds rich, flexible chat functionality to your Laravel application with minimal setup and maximum customization. Whether you're building one-on-one messaging, group chatrooms, or bot integrations, this package gives you the tools to implement powerful conversations between any models in your app.
---
## ๐ Features
* Send messages between any models
* One-to-one and multi-user chatrooms
* System messages and bot support
* Unread message tracking
* WebSocket connection detection
* Notifications via Laravel and WebPush
* REST API endpoints included
* No frontend views โ bring your own UI---
## ๐ฆ Installation
```bash
composer require mmedia/le-chat
```Publish migrations and config:
```bash
php artisan vendor:publish --tag="chat-migrations"
php artisan migratephp artisan vendor:publish --tag="chat-config"
```---
## ๐ง Core Concepts
* `Chatroom`: A conversation space containing messages and participants
* `ChatParticipant`: A polymorphic link between your models and a chatroom
* `Message`: A message sent by a participant in a chatroom
* `IsChatParticipant` Trait: Add to any model to enable chat behavior---
## โ Requirements
* PHP 8.0+
* Laravel 11+---
## โจ Quick Example
```php
$message = $user->sendMessageTo($otherUser, "Hello!");
$reply = $otherUser->sendMessageTo($user, "Hi back!");
```Easily send messages to:
* Individual users
* Multiple recipients
* Entire chatrooms
* Non-model participants (bots, services, etc.)---
## ๐ฅ Why Not Chatify?
Unlike [Chatify](https://github.com/munafio/chatify), Le Chat **does not limit messages to one sender and one recipient**. This package supports:
* Multi-participant chatrooms
* Flexible polymorphic model support
* Bots and non-DB participants---
## ๐ Full Documentation
See the complete usage guide for in-depth examples, APIs, and advanced features:
๐ [View Full Docs โ](https://laravelchat.netlify.app/)
---
## ๐งช Comparison to Other Projects
* [Wirechat](https://github.com/namumakwembo/wirechat) โ Livewire-heavy
* [Musonza Chat](https://github.com/musonza/chat) โ Feature-rich but complex
* Le Chat โ **Simple API, full flexibility, no view layer**---
## ๐โโ๏ธ Use Cases
* Teacher โ Student chat (one-on-one)
* Teachers + Students group chats per class
* Chatbot โ User conversations
* Cross-platform relay (e.g. Slack integration)---
## ๐ License
MIT ยฉ