laravel-notification-channels/backport
Brings Laravel's modern notification channel features to older framework versions, letting legacy apps use mail, database, broadcast and other channels through a familiar, lightweight backport that requires minimal setup and keeps existing notification code unchanged.
Build vs. buy for notification plumbing on a legacy stack. The recurring PM question is whether to fund a sprint of custom multi-channel notification code — a Notification base class, a channel manager, a Notifiable trait, queue integration, mail/database drivers — or adopt an existing abstraction. This package is the cheapest possible "buy": MIT-licensed, zero cost, and a drop-in replay of Laravel 5.3's notification API. It substitutes for roughly a sprint of hand-rolled plumbing, which is the strongest argument it has.
Decoupling feature delivery from platform work. The real decision it informs is sequencing, not architecture. Adopting this lets a team ship a user-facing notification feature — password resets, invoice receipts, order-status pings, ops alerts to Slack — on Laravel 5.1/5.2 without first funding a framework upgrade. That lets you put the upgrade on its own track and judge it on its own merits, instead of holding a roadmap item hostage to a platform investment that may be several quarters out.
Committing to a channel-agnostic notification contract. If the roadmap line is "notify users when X happens," this supports committing to a design where the notification is written once and delivered by mail now, with database/in-app, SMS, or chat added later without re-architecting. That de-risks phase-two channel expansion and keeps the contract stable as requirements grow.
Making risk acceptance explicit rather than implicit. The dependency profile is itself a decision input: last release November 2016, 26 stars, zero dependents, PHP floor past end-of-life, no upstream triage path. Choosing this is choosing to own the code. For a bounded internal tool on a frozen stack that can be a legitimate call; for a customer-facing engagement surface with a multi-year horizon it is not. The PM's job is to make the trade-off visible instead of letting a team default into it.
Prioritization of the upgrade itself. Because this is a bridge and not an architecture, adopting it forces a companion decision: when does the framework upgrade get funded? Pair adoption with a named owner and an explicit "remove backport, upgrade framework" ticket, or the stopgap quietly becomes permanent. The package's day-to-day value is buying velocity now; the discipline of writing 5.3-shaped code is what keeps that velocity from calcifying into a second legacy layer.
Scoping of the notification MVP. The package's real supported surface is narrower than "notifications": mail, database, and broadcast, with custom channels as the escape hatch. That naturally shapes a phased scope — prove mail end-to-end first, add in-app via the database channel and the Notifiable trait's unreadNotifications()/markAsRead() methods, and treat SMS/chat as custom-channel work with its own estimate. It also flags likely gaps up front: markdown mail rendering and on-demand notifications (Notification::route(...), a 5.5 feature) should be validated before they appear in a commitment.
Consider it when all of these hold:
Illuminate\Notifications\* namespace is confirmed absent. Verify before anything else — on 5.3+ this dependency is dead weight.via()/toMail()/toDatabase()/routeNotificationForMail(), Notification::send() — with no backport-specific APIs. This is the condition that makes the eventual exit a clean deletion.Look elsewhere — or fund the upgrade instead — when any of these hold:
illuminate/* constraints, or would require --ignore-platform-reqs or root composer.json constraint edits. That friction is a signal the stack is too entangled for a cheap shim.For executives — the one-liner: This is a free, MIT-licensed library that lets us ship notification features on our current Laravel version now, instead of waiting on a framework upgrade. It costs us no license fee and replaces roughly a sprint of custom plumbing. The catch is that it is unmaintained, so we own it — which is why we're pairing it with a named owner and a scheduled exit.
Notifier so the package is swappable, and keep every notification class written against the standard Laravel 5.3 namespace so removal is a deletion rather than a rewrite.For engineering — the framing: write every notification as if we are already on 5.3. Import from Illuminate\Notifications\*, use via()/toMail()/toDatabase(), use Notification::send() and $user->notify(), use routeNotificationForMail() for recipient resolution. Treat the Laravel 5.3 notification docs as the reference manual — there is no backport documentation site, and the vendor directory is the specification. Never reach for a shim-specific class; the moment someone does, that becomes permanent debt and the upgrade stops being clean.
Sequencing to commit to:
composer.json before writing a line of code.Notification facade alias manually (no auto-discovery on 5.1/5.2), publish the config and migration, inspect the notifications schema before running it.Notifiable trait, the channel manager, the MailMessage builder, and the riskiest bridge in the package.unreadNotifications(), markAsRead()), not raw queries, so the query shape survives the upgrade.Notification::fake()/assertSentTo() if they survived, otherwise a spy channel.How can I help you explore Laravel packages today?