revolution/laravel-notification-mastodon
A Laravel notification channel for sending notifications to Mastodon. Publish status updates directly from your app using Laravel's notification system, with simple configuration and support for the Mastodon API so you can integrate posting into existing workflows.
Notification system for email, Slack, SMS, or push, this package adds Mastodon as a first-class delivery channel with one notification class and a toMastodon() method. The decision it informs is "add federated social as a first-party channel" versus leaving it as an ad-hoc marketing script.Consider it when:
Notifiable models plus Notification::send(); the marginal integration cost is near zero.Look elsewhere when:
Adoption criteria to gate on: read the source end-to-end (it is small), confirm it targets the current Mastodon API, confirm PHP/Laravel version compatibility with your app, and confirm media-attachment and error-handling behavior. If any of that is unclear, vendor the class instead of installing it.
For executives: This is a small, free, MIT-licensed adapter that lets our existing Laravel notification system post to Mastodon. It costs effectively nothing to evaluate and can be replaced or absorbed into our codebase at any time. The strategic value is optionality: it lets us measure whether a fediverse presence is worth real roadmap investment before we spend any. The risk is equally small — the project is a single-maintainer, low-adoption open-source component, so we should treat it as a time-boxed experiment with an owned fallback, not as infrastructure we depend on. Recommended ask: a short spike (days, not weeks) plus a decision checkpoint on engagement metrics.
For engineering: It is one notification channel class implementing Laravel's Notification contract — via() returns the channel, toMastodon() returns the status payload. Integration is a Composer require, a config entry for the instance URL and access token, and one notification class per event. Because it is small and MIT, our default posture is to vendor the source into our repo rather than pin a dependency: that removes abandonment risk, lets us patch API drift ourselves, and keeps our notification abstraction clean. Audit surface is minimal; the main things to verify before merge are PHP/Laravel version constraints, media upload handling, error/retry behavior on rate limits, and that credentials are read from config rather than hardcoded. Wrap it behind our own channel interface so swapping to a maintained client or a managed publisher later is a one-file change.
Bottom line: High fit, low stakes. Adopt behind an internal abstraction, own the code, and use it to answer a product question — not to satisfy an architectural one.
How can I help you explore Laravel packages today?