Download the PHP package dominservice/conversations without Composer
On this page you can find all versions of the php package dominservice/conversations. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download dominservice/conversations
More information about dominservice/conversations
Files in dominservice/conversations
Package conversations
Short Description This package will allow you to add a full user messaging system into your Laravel application.
License MIT
Homepage https://github.com/dominservice/conversations
Informations about the package conversations
Laravel Conversations - Complete Messaging System
A powerful, flexible, and feature-rich messaging system for Laravel applications. Build real-time chat, messaging platforms, support systems, and communication tools with ease.
Features
- 💬 Complete Messaging System - Private and group conversations with full message history
- ⚡ Real-time Communication - Built-in broadcasting support for instant messaging
- 🔌 Multiple Broadcasting Drivers - Support for Pusher, Laravel WebSockets, Firebase, MQTT, and Socket.IO
- 📎 File Attachments - Support for images, documents, audio, and video files with security features
- 🖼️ Image Optimization - Automatic image resizing, format conversion, and thumbnail generation
- 🌐 RESTful API - Ready-to-use API endpoints for web and mobile applications
- 🪝 Extensible Hook System - Customize behavior without modifying core code
- 🌍 Multilingual Support - Easily translate all messages to any language
- 📱 Mobile-Friendly - Works seamlessly with mobile applications
- 🔒 Secure - Built with security best practices including virus scanning for attachments
- 📝 TypeScript Support - Type definitions for Vue and React components
Compatibility
Package Version | Laravel Compatibility |
---|---|
1.* | 5.6 - 9.* |
2.* | 8. - 11. |
3.* | 9. - 12. |
Note: Version 3.0.0 introduces significant new features including real-time broadcasting, hooks system, API endpoints, and multilingual support.
Installation
1. Install via Composer
2. Publish Configuration and Migrations
This will publish all assets including config, migrations, translations, and routes. If you want to publish specific assets, you can use one of the following tags:
3. Run Migrations
4. Register Service Provider (Laravel < 5.5)
For Laravel 5.5 and above, the package will be auto-discovered. For older versions, add the service provider to config/app.php
:
Note: If you're experiencing issues with the package not appearing in the vendor:publish list, make sure your application has properly registered the service provider. You can manually register it in your
config/app.php
file even if you're using Laravel 5.5+ to ensure it's loaded correctly.
Quick Start
Basic Usage
Real-time Chat
Enable broadcasting in your .env
file:
Then use the broadcasting features:
Documentation
Comprehensive documentation is available to help you get the most out of the package:
- Examples & Usage Guide - Code examples and implementation guides
- Integration Guides - Detailed guides for integrating with Laravel Breeze, Jetstream, Livewire, Inertia.js, Sanctum, and Nova
- API Documentation - Information about the REST API endpoints
- GraphQL API Documentation - Information about the GraphQL API
- Frontend Components - Ready-to-use Vue and React components
- TypeScript Support - Type definitions for Vue and React components
- Broadcasting Documentation - Information about real-time broadcasting
- Hooks Documentation - Information about the hook system
- Translations Documentation - Information about customizing messages
- Routes Documentation - Information about customizing API routes
Upgrading from laravel_chat
This package is a continuation of the dominservice/laravel_chat package. If you're upgrading:
- Install this package alongside the old one
- Run migrations (they include data migration scripts)
- Remove the old package
Always make a backup before performing this operation!
Testing
The package includes automated tests to ensure functionality works as expected. To run the tests:
Requirements
- PHP with SQLite extension enabled (
php-sqlite3
)
If you don't have the SQLite extension installed, you can install it on Ubuntu/Debian with:
On CentOS/RHEL:
Running Tests
Alternatively, you can use the provided script:
Continuous Integration
This package uses GitHub Actions for continuous integration and continuous deployment (CI/CD). The workflow includes:
- Running tests on multiple PHP versions (8.1, 8.2, 8.3) and Laravel versions (9., 10., 11.*)
- Code style checking with PHP_CodeSniffer (PSR-12)
- Static analysis with PHPStan
- Automated releases when tags are pushed
The CI/CD pipeline ensures that all code changes are thoroughly tested before being merged into the main branch. You can see the workflow configuration in the .github/workflows/ci-cd.yml
file.
Usage Examples
Here are some common usage examples. For more detailed examples, see the Examples & Usage Guide.
Creating and Managing Conversations
Reading Messages and Conversations
Message Status Management
Read Receipts and "Seen By" Functionality
API Endpoints for Read Receipts
The package provides API endpoints for retrieving read receipt information:
GET /api/conversations/{uuid}/messages/{messageId}/read-by
- Get all users who have read a specific messageGET /api/conversations/{uuid}/read-by
- Get all messages in a conversation with their read status
Real-time Read Receipts
When broadcasting is enabled, the message.read
event includes information about who has read the message:
Message Reactions
The package supports emoji reactions to messages, similar to popular messaging platforms:
API Endpoints for Reactions
The package provides API endpoints for managing reactions:
GET /api/conversations/{uuid}/messages/{messageId}/reactions
- Get all reactions for a messagePOST /api/conversations/{uuid}/messages/{messageId}/reactions
- Add a reaction to a messageDELETE /api/conversations/{uuid}/messages/{messageId}/reactions/{reaction}
- Remove a reaction from a message
Real-time Reaction Updates
When broadcasting is enabled, reaction events are broadcast in real-time:
Attachments
The package supports file attachments with various security and optimization features:
Message Editing
The package allows users to edit their messages within a configurable time window:
API Endpoints for Message Editing
The package provides API endpoints for message editing:
PUT /api/conversations/{uuid}/messages/{messageId}
- Edit a messageGET /api/conversations/{uuid}/messages/{messageId}/editable
- Check if a message is editable
Real-time Message Editing Updates
When broadcasting is enabled, message edit events are broadcast in real-time:
Message Threading
The package supports threaded replies to messages, similar to popular messaging platforms:
API Endpoints for Message Threading
The package provides API endpoints for message threading:
POST /api/conversations/{uuid}/messages/{messageId}/reply
- Reply to a messageGET /api/conversations/{uuid}/messages/{messageId}/thread
- Get all messages in a thread
Real-time Thread Updates
When broadcasting is enabled, new replies in a thread are broadcast as regular messages with a parent_id field:
Helper Functions
The package also provides helper functions for easier usage:
Why Choose Laravel Conversations?
- Complete Solution: Everything you need for a messaging system in one package
- Highly Customizable: Extensive configuration options and hook system
- Well-Documented: Comprehensive documentation with examples
- Actively Maintained: Regular updates and improvements
- Production Ready: Used in production applications
- Mobile Compatible: Works with web and mobile applications
- Real-time Capable: Built-in broadcasting support
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
This package is open-sourced software licensed under the MIT license.
Credits
- dominservice
- tzookb/tbmsg (Original inspiration)
- All Contributors
All versions of conversations with dependencies
laravel/framework Version ^9|^10|^11|^12
intervention/image Version ^3.0
astrotomic/laravel-translatable Version ^11.0
nuwave/lighthouse Version ^6.0