agencelex/notifications
agencelex/notifications is a Laravel package that simplifies sending and managing application notifications. It provides a clean API for dispatching alerts to users, helping you keep people informed with minimal boilerplate and straightforward integration into existing Laravel projects.
NotificationDispatcherInterface::route() / routes() returning AnonymousNotifiable) let you notify an arbitrary address or identifier — a prospect who filled a form, a vendor contact, an email captured in a support flow — with no persisted model and no database record. This unlocks lead-nurture, invite, and pre-registration flows that previously required either a throwaway table or a queue job per message.routeNotificationFor<Channel>() convention plus routing-before-delivery means a single notification can be composed once and delivered over mail, Slack, database, or a custom channel, with per-channel routing resolved by convention. Product can spec "notify via the user's preferred channel" without per-channel plumbing in each feature.routeNotificationFor<Channel>() on notifiables. Treat "add channel X" as a small, schedulable increment rather than an architecture item.Adopt when all of the following hold:
agencelex/notifications), not a Laravel package — it deliberately mirrors Laravel's notification API (notifiables, via(), routeNotificationFor*, anonymous notifiables), so Laravel familiarity transfers, but a Laravel codebase should use Laravel's own notifications instead. Confirm this with engineering before anything else, because the naming invites the mistake.Look elsewhere when:
Notifiable trait semantics — use Laravel.Upgrade cost for v1.5.0 (budget this explicitly):
routeNotificationFor<Channel>(); unrouted channels are silently skipped, which converts a hard failure into a missing message. Add a delivery assertion to your test suite before upgrading.getName() are keyed by short class name (SlackChannel, not the FQCN) — update every via() return value that used a fully-qualified key.my-channel → routeNotificationForMyChannel()); verify existing method names still resolve.NotificationDispatcherInterface implementations must add channel(), route() and routes().routeNotificationFor('database') returning true instead of null is intentional so the database channel is never skipped — do not "fix" it back.getEmail() is required now; the getLastName()-without-getFirstName() fatal error is fixed.Plan a short migration spike plus a regression pass over every notification path, and specifically test the silent-skip behaviour — that is the highest-risk change for a product because failures become invisible.
For executives. This is the messaging backbone for our TYPO3 platform: one notification definition, delivered over mail, Slack, in-app database records, or future channels. The headline from v1.5.0 is on-demand notifications — we can message a person who is not yet a user in our system, removing a persistent blocker on lead capture and invitation flows that previously required a database workaround. The release also adds a maintained test suite across two TYPO3 versions, which reduces the risk of depending on it for customer-facing communication. Cost is a contained upgrade: a breaking release, so a short migration with regression testing, estimated at a few days of engineering rather than a project.
For engineering. Treat this as a breaking upgrade, not a minor bump. The dispatch path now resolves routeNotificationFor($channel, $notification) before every delivery and skips channels with an empty route, so any notifiable missing a route method stops receiving messages without an error. Custom channel keys change from FQCN to short class name for channels lacking getName(), the dispatcher interface gains channel(), route() and routes(), and route method names are derived from channel keys in UpperCamelCase. The mail trait is loosened (only getEmail() required) and a getLastName()-without-getFirstName() fatal is fixed. Sequence it as: pin the test suite first, add routing methods, update via() keys, migrate custom dispatchers, then verify database-channel delivery explicitly since it is now never skipped.
Ask. Approve the upgrade as a small scoped migration with a mandatory regression pass over all notification paths, and confirm the platform is on TYPO3 13.4+ — if the team is on Laravel rather than TYPO3, stop and use native Laravel notifications instead.
How can I help you explore Laravel packages today?