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
Rocket Chat

Rocket Chat Laravel Package

laravel-notification-channels/rocket-chat

A Laravel notification channel for sending messages to Rocket.Chat. Integrate Rocket.Chat incoming webhooks with Laravel notifications to deliver alerts, updates, and custom messages from your application.

View on GitHub
Deep Wiki
Context7

Rocket.Chat Notifications channel for Laravel 5.6+

Frequently asked questions about Rocket Chat
How do I install and configure laravel-notification-channels/rocket-chat?
Install the package with Composer, then add rocketChat to the via() array of a Laravel notification. Return the Rocket.Chat incoming webhook URL from routeNotificationForRocketChat() on the notifiable, or supply it for on-demand sends. The channel sends through Laravel's HTTP client to Rocket.Chat's incoming webhook endpoint.
How do I send a Rocket.Chat notification in Laravel?
Create a notification class and add rocketChat to its via() method. Build the message with the package's RocketChatMessage value object and return it from toRocketChat(). Dispatch the notification normally; if it implements ShouldQueue, Laravel will queue the webhook call.
Does this package support Laravel 11 and Laravel 12?
The README states Laravel 5.6+, but that is not a reliable guide for modern applications. Verify the current composer.json constraint matrix for Laravel 11 and 12 and for PHP 8.2 and 8.3 support before sign-off. The published constraints, not the README, are the gating item.
How do I route Rocket.Chat notifications to different webhook URLs per user?
Implement routeNotificationForRocketChat() on the notifiable model and return the webhook URL for that user or team. This keeps the webhook URL resolved from application state rather than hard-coded in the notification. For ad-hoc sends, use Notification::route('rocketChat', $webhookUrl)->notify(...).
Can I send on-demand Rocket.Chat notifications without a model?
Yes. Use Notification::route('rocketChat', $webhookUrl)->notify(new YourNotification()) for ad-hoc delivery. This is the recommended starting point so you do not prematurely couple webhook URLs to Eloquent models. The channel is designed around Laravel's on-demand notification routing.
How do I test Rocket.Chat notifications in Laravel?
If the channel uses Illuminate\Support\Facades\Http, you can use Http::fake() to assert the outgoing webhook request and payload. If it uses raw Guzzle instead, test ergonomics degrade and you may need to wrap or fake the transport manually. Because the package is small, you can also extract message building and test that separately from delivery.
Does it support Rocket.Chat attachments, buttons, or rich formatting?
This is a key item to verify in the source before adopting: check whether RocketChatMessage exposes Rocket.Chat attachments beyond plain text. If the channel is plain-text-only, alerting use cases lose color bars, fields, and buttons, which materially reduces its value. Rocket.Chat's webhook payload is close to Slack's, but attachment schemas and field names differ enough that Slack message code cannot be copied unchanged.
Is laravel-notification-channels/rocket-chat maintained and safe for production?
The package is MIT licensed with a tiny dependency tree and a narrow contract, so the blast radius of breakage is bounded. However, it has roughly 13 stars, zero dependents, and a last release dated 2024-04-15, so treat it as single-maintainer, fork-on-sight code. It is not abandoned, but it is not actively exercised either.
How does the channel handle Rocket.Chat rate limits, retries, and failures?
Verify this before sign-off: the channel should honor Rocket.Chat 429 responses and surface 4xx errors as exceptions so Laravel's queue retry and failed() hooks fire. The behavior depends on whether it uses Laravel's HTTP client and how it handles non-success responses. If it swallows errors, you lose queue retry semantics and failure visibility.
What are alternatives to this package, and can I migrate from Slack or raw webhooks?
If your stack does not standardize on Laravel Notifications, call Rocket.Chat's incoming-webhook endpoint directly or own a roughly 100-150 line replacement channel. From Slack, the Notifiable routing and Notification classes carry over, but the message-building layer must be rewritten; budget 0.5 to 1 day per notification class. From raw cURL or custom webhook jobs, adoption is a clean win because it consolidates ad-hoc HTTP calls into a tested, queued channel.
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.
microsoft/fluentui-system-icons
mmccook/php-json-canonicalization-scheme
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