Download the PHP package muba00/laravel-live-chat without Composer
On this page you can find all versions of the php package muba00/laravel-live-chat. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download muba00/laravel-live-chat
More information about muba00/laravel-live-chat
Files in muba00/laravel-live-chat
Package laravel-live-chat
Short Description A Laravel package that adds real time live chat functionality to your application.
License MIT
Homepage https://github.com/muba00/laravel-live-chat
Informations about the package laravel-live-chat
Laravel Live Chat
A simple, elegant Laravel package that adds real-time 1-to-1 chat functionality to your application using Laravel Reverb. Easy to install, easy to use, and follows Laravel best practices.
โจ Features
- ๐ Real-time messaging using Laravel Reverb WebSockets
- ๐ฌ 1-to-1 conversations between users
- โ Read receipts to track message status
- โ๏ธ Typing indicators for better UX
- ๐ Built-in authorization policies
- ๏ธ Highly configurable with sensible defaults
- ๐งช Thoroughly tested with 100+ tests
- ๐ฆ Easy to remove - clean uninstall with no residual code
๐จ Frontend Components Coming Soon! Complete React, Vue 3, and Livewire UI components are currently in development. For now, you can use the backend API to build your own custom frontend.
๐ Requirements
- PHP 8.3+
- Laravel 11.0+
- Laravel Reverb (for real-time features)
- Laravel Sanctum (for API authentication)
๐ Quick Start
1. Install the Package
2. Run the Installer
This interactive command will:
- Check prerequisites
- Publish configuration files
- Publish and run migrations
- Guide you through additional setup steps
3. Configure Broadcasting
Install Laravel Reverb:
4. Configure Authentication
If not already done, install Laravel Sanctum:
5. Install Frontend Dependencies
6. Start Using the Chat!
Backend - Create a conversation and send a message:
Frontend - Build your own custom UI:
Use the provided API endpoints to build your custom chat interface. Complete frontend components for React, Vue 3, and Livewire are coming soon!
๐ Documentation
Installation
Manual Installation (Alternative)
If you prefer to install manually instead of using the installer command:
Configuration
The package configuration file is published to config/live-chat.php. Here are the key configuration options:
Environment Variables
You can override configuration using environment variables:
Usage
Backend API
The package automatically registers RESTful API routes:
Using Models
Frontend Integration
The package provides a RESTful API for building custom chat interfaces. Complete frontend components for React, Vue 3, and Livewire are currently in development.
Example API Usage
Broadcasting Setup
Configure Laravel Reverb
Add to your .env:
Setup Laravel Echo
In your resources/js/bootstrap.js:
Start Reverb Server
For production, use a process manager like Supervisor.
Artisan Commands
Install Command
Cleanup Command
Schedule cleanup automatically:
Security
The package includes built-in authorization:
- Users can only access conversations they're part of
- Messages are validated before storage
- XSS protection via message sanitization
- Rate limiting support
- Private broadcast channels with authorization
Customization
Customize Models
You can extend the package models in your application:
Then update your config to use your custom model.
Disable Auto-registered Routes
Then register routes manually in your routes/api.php.
๐งช Testing
๐๏ธ Uninstalling
๐ Additional Resources
- API Reference
๐ Troubleshooting
Messages not appearing in real-time
- Check Reverb is running:
php artisan reverb:start - Verify
.envconfiguration for Reverb - Check browser console for WebSocket errors
- Ensure Laravel Echo is properly initialized
Authorization errors
- Verify Sanctum is installed and configured
- Check API token is being sent in requests
- Ensure user is part of the conversation
Database errors
- Run migrations:
php artisan migrate - Check table names in config match your setup
- Verify user model configuration
๐ค Contributing
Please see CONTRIBUTING for details.
๐ Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
๐ Changelog
Please see CHANGELOG for more information on what has changed recently.
๐ Credits
- Mubariz Hajimuradov
- All Contributors
๐ License
The MIT License (MIT). Please see License File for more information.
All versions of laravel-live-chat with dependencies
spatie/laravel-package-tools Version ^1.16
illuminate/contracts Version ^11.0||^12.0