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
Laravel Notify

Laravel Notify Laravel Package

mckenziearts/laravel-notify

Laravel Notify is a lightweight Laravel package for displaying backend-driven notifications in your app. It offers Tailwind CSS 4 and Alpine.js integration, publishable config and assets, and a simple Blade component you can drop into any layout.

View on GitHub
Deep Wiki
Context7

Laravel Notify is a lightweight package for displaying backend-driven notifications in Laravel applications. It provides a simple API to flash messages from your controllers or Livewire components and renders them as animated toast notifications, supporting multiple types such as success, error, warning, and info.

The package integrates seamlessly with Tailwind CSS 4.x and Alpine.js, letting you add the <x-notify::notify /> component to your layout and build assets through your existing pipeline. Configuration and assets are publishable via Artisan.

  • Backend-driven notifications with a fluent PHP API
  • Multiple notification types (success, error, warning, info)
  • Native Tailwind CSS and Alpine.js integration
  • Publishable config and assets for full customization
  • Blade component ready to drop into any layout
Frequently asked questions about Laravel Notify
How do I install mckenziearts/laravel-notify in a Laravel app?
Install it with composer require mckenziearts/laravel-notify, then publish the package assets and config using php artisan vendor:publish --tag=notify-assets and php artisan vendor:publish --tag=notify-config. Add the <x-notify::notify /> Blade component to your main layout, usually before the closing body tag, and build your front-end assets. The package has no database table, queue, or external service requirements.
Does Laravel Notify work with Tailwind CSS 4 and Alpine.js?
Yes. With Tailwind CSS 4, add an @source line pointing at vendor/mckenziearts/laravel-notify/resources/views/**/*.blade.php in your app.css, import Alpine.js in your JavaScript bundle, and place the Blade component in your layout. Teams on Tailwind 3 can use the precompiled asset route with @notifyCss and @notifyJs instead of coupling the package to their Tailwind build. This package is designed around Alpine.js 3.x for its toast and alert rendering.
What Laravel versions does mckenziearts/laravel-notify support?
Recent releases have included compatibility updates for newer Laravel versions, including Laravel 13 in the package assessment context. You should still check the exact PHP and Laravel constraints on Packagist before upgrading a production application. The package is aimed at classic server-rendered Laravel monoliths rather than infrastructure-heavy or SPA-first setups.
How do I send a flash notification from a Laravel controller with Laravel Notify?
Use the fluent notify() builder from backend code, for example notify()->success()->title('Saved')->send(). The package serialises the notification as a flash payload and the Blade component renders it on the next page. You can choose alert styles such as toast, connect, smiley, emotify, or drake depending on the UX you want.
Do I need Alpine.js to use Laravel Notify?
Yes, Laravel Notify relies on an Alpine.js store to render and control its notifications. You can either import Alpine.js into your own application bundle or use the package's precompiled JavaScript through @notifyJs. If you are not already using Alpine.js, this adds a second JavaScript runtime that should be evaluated against your front-end stack.
Can I use Laravel Notify with Inertia.js or Livewire?
It is a weaker fit for Inertia or SPA-style front ends because the root Blade template can host the component, but you must verify how flash data survives Inertia visits and partial reloads. It also competes with existing notification systems such as Filament, Livewire/WireUI, or an in-house design system, creating two patterns in one codebase. For server-rendered Blade layouts, integration is much more straightforward.
How do I test Laravel Notify notifications in my test suite?
The README does not document a dedicated assertion API for notifications, so CI coverage likely depends on asserting the underlying session flash payload. You should confirm the exact flash key and payload shape in your application before relying on it in tests. If notification output is business-critical, consider adding your own small test helper around the builder or session assertions.
Are Laravel Notify action buttons secure for delete or undo flows?
Laravel Notify actions can issue POST, PUT, or DELETE requests to your application routes with automatic CSRF headers, which is useful for undo and restore flows. However, those routes remain your responsibility: enforce authentication and policy checks server-side, and make destructive actions idempotent where needed. CSRF expiry or session timeout can also produce 419 errors from a stale browser tab, so handle that gracefully.
Is mckenziearts/laravel-notify actively maintained and safe for production?
It is effectively a single-maintainer package with a bus factor of one, and recent releases have been dominated by dependency updates and framework compatibility rather than new features. That is acceptable for a small, reversible UI helper, but it should be treated as a tactical presentation dependency rather than a foundational one. Pin versions, review upgrades, and keep in mind that its blast radius is small because removal mainly involves the layout tag and controller calls.
What are alternatives to Laravel Notify for Laravel flash messages?
Common alternatives include notification systems built into Filament, Livewire/WireUI, or an existing in-house design system. A plain Laravel session flash message rendered by your own Blade partial is also viable if you only need simple alerts. Laravel Notify makes the most sense when you want backend-driven toasts with Tailwind CSS 4 and Alpine.js and do not already have a standard notification pattern.
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.
dbravoan/dbcms-admin-theme-dbcms
dbravoan/dbcms-theme-db-cyber
dbravoan/dbcms-blocks-basic
dbravoan/dbcms-module-content-audit
dbravoan/dbcms-module-ai-assistant
paygate-to/paygate-php
padosoft/askmydocs-connector-base
defstudio/supercharged-carbon
bernskioldmedia/laravel-matomo
bernskioldmedia/laravel-harvest
bernskiold/laravel-data-scrubber
bernskiold/laravel-currency-converter
bernskiold/laravel-campaign-monitor
bernskioldmedia/laravel-autotranslate
siberfx/telegram-bot
roy-sandip/laravel-view-extended
gregsphotography/site-builder-core
roy-sandip/laravel-view
anodyne/blade-fluentui-icons
webx-ui/module-catalog-collections