Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Chat Laravel Package

musonza/chat

A Laravel package for adding chat and messaging to your application. It provides Eloquent models for conversations, participants, and messages, supports private and group chats, read tracking, events, and a simple API for integrating messaging features.

View on GitHub
Deep Wiki
Context7

A Laravel chat package. You can use this package to create a chat/messaging Laravel application.

Frequently asked questions about Chat
How do I install musonza/chat in a Laravel application?
Install it with composer require musonza/chat, then publish the package config and migrations with the vendor:publish command and run php artisan migrate. Next, implement the participant contract on the models that should be able to join conversations, such as User or Team. After that you can create conversations and send messages through the package API. There is no external service, credential provisioning, or SDK versioning involved.
Which Laravel and PHP versions does musonza/chat support?
The supported Laravel and PHP versions are declared in the composer.json of each tagged release, so check that file rather than relying on the README. The project has historically shipped package majors alongside Laravel majors, so plan roughly one compatibility cycle per Laravel major release. Pin the package and framework versions together in composer.json and run upgrades through CI before rolling them out.
How do I make my User model a chat participant?
The package uses polymorphic participants, so any existing Eloquent model can join a conversation once it implements the participant contract. In practice you add the contract and its required methods to your User model, and optionally to Team, Organization, or tenant models. Because participants are polymorphic, you do not need a parallel identity table or a duplicate user directory for chat.
Does musonza/chat support private chats and group chats?
Yes. A private chat is simply a conversation with two participants, while group chats add any number of participants to the same conversation record. Both use the same conversation, participant, and message tables, so your UI and querying logic stay consistent. Membership changes are handled through the package API rather than direct table writes.
How do unread counts and read tracking work in musonza/chat?
The package stores read state per participant, so you can mark a conversation as read and derive unread counts for a user. Read tracking here means unread state rather than detailed per-message read receipts across a large group. Verify the exact methods against the tagged source before designing your notification badges and inbox UI around them.
Does musonza/chat handle realtime broadcasting of messages?
The package fires lifecycle events for conversations, participants, and messages, but it does not ship a realtime transport. You broadcast those events yourself through Laravel's broadcasting system using Pusher, Ably, Reverb, or a similar driver, then consume them with Laravel Echo. Treat realtime delivery, typing indicators, and presence as application-side work.
Is musonza/chat suitable for a multi-tenant Laravel application?
There is no native tenant isolation; the package owns the chat table schema and column semantics. You can layer tenant scoping on with global scopes or a tenant_id column, but that usually means maintaining a fork or a parallel sync layer to keep the schema consistent with upstream. If strict retention, audit, or data residency rules apply, validate the schema against them before committing.
What features are out of scope for musonza/chat?
Attachments and rich media, typing indicators, presence, message edit history, moderation workflows, full-text search, and push notifications are not packaged features. The package provides messaging primitives: threads, membership, messages, and unread state. Budget those extras as custom application work rather than assuming they come for free, and verify against the tagged source rather than README claims.
How should I test chat features built on musonza/chat?
Because the package is Eloquent-native, you can test against a real database using RefreshDatabase and assert directly on conversations, participants, and messages. Use model factories for your own User and Team models, and fake or assert the package events where your application reacts to them. The v6.15.2 release only touched the package's own CI and test suite, removing legacy factories, so it does not change how you test your application.
Is musonza/chat actively maintained, and how hard is it to upgrade or replace?
The package is MIT licensed with strong adoption, but it is community-maintained with no commercial SLA, so assume bus-factor and roadmap risk. Each Laravel major has historically required a matching package major, so pin versions and schedule an upgrade cycle per framework release. To limit lock-in, keep conversation and message flows behind a thin service or interface layer instead of scattering package model calls throughout your codebase.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console
pnscripts/filament-broadquill-lite
pnscripts/laravel-sentfold-lite
vleap/mx-sdk-laravel-internal
twidpay/utils
htetmyathlaing/scout-elasticsearch-driver
artisan-toolbox/front-awesome
ls/client-assistant
users-au/laravel-client
cgv/localized-resource
noith/settings
kda/laravel-package
kda/filament-dynamic-navigation
bypersoft/signbox
pairus/product-data
fayne/laravel-filament-cms-core
nodisrupt/laravel-agent
sierratecnologia/media-manager