Weave Code
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

Lightweight Laravel package for backend-driven toast notifications. Install via Composer, publish config/assets, drop in the Blade component, and trigger success/error/info messages from your app. Works great with Tailwind CSS + Alpine.js.

View on GitHub
Deep Wiki
Context7

Laravel Notify is a lightweight Laravel package for showing backend-driven notifications (flash messages) in your app with minimal setup. Install via Composer, publish assets/config, then drop a single Blade component into your layout to start displaying alerts.

It supports modern stacks like Tailwind CSS and Alpine.js, letting Tailwind scan the package views so styles are generated automatically during your build.

  • Backend-driven notification API for controllers/actions
  • Simple Blade component: <x-notify::notify />
  • Works great with Tailwind CSS (4.x) + Alpine.js
  • Publishable assets and configuration
  • Fits easily into existing Laravel layouts and build pipelines
Frequently asked questions about Laravel Notify
How do I install Laravel Notify in my Laravel project?
Run `composer require mckenziearts/laravel-notify` to install via Composer. Then publish the config and assets with `php artisan vendor:publish --tag=notify-assets --tag=notify-config`. Follow the Tailwind or standalone setup instructions in the README.
Does Laravel Notify work with Laravel 13?
Yes, Laravel Notify supports Laravel 8.x through 13.x. Check the package’s `composer.json` for exact version constraints, but it’s actively maintained for modern Laravel releases. Downgrade if needed for older versions.
Can I use Laravel Notify without Tailwind CSS?
Yes, you can publish the package’s pre-compiled CSS/JS assets and include them manually in your layout. The package provides `@notifyCss` and `@notifyJs` directives for easy integration, though Tailwind integration is the recommended path for dynamic styling.
How do I trigger a notification from a controller?
Use the `notify()` helper method in your controller. For example, `notify()->success('Your action was completed!')` or `notify()->error('Something went wrong.')->withAction('Retry', route('action.retry'))` for interactive alerts.
Will notifications persist across page reloads?
No, notifications are session-based and rely on Laravel’s flash data. They’ll disappear after the next page load unless you manually re-flash them. For persistent notifications, consider storing them in a database or queue.
Is Alpine.js required for notifications to work?
Alpine.js is only required if you’re using the Tailwind CSS integration path for interactive features like auto-dismissal or action buttons. For static notifications, you can disable Alpine.js and use standalone CSS/JS.
Can I customize the notification styles beyond Tailwind?
Yes, publish the assets (`php artisan vendor:publish --tag=notify-assets`) to override the Blade views or CSS. You can modify the published `resources/views/vendor/notify` files or extend the Tailwind classes in your own CSS.
Does Laravel Notify support non-Blade frontend frameworks like React or Vue?
Not natively, as notifications rely on Laravel’s session flash data and Blade components. For React/Vue, you’d need to create a custom API endpoint to fetch notifications or use a middleware to store them in a database/queue for frontend consumption.
How do I add custom actions (e.g., 'Undo') to notifications?
Use the `withAction()` method when triggering a notification. For example, `notify()->warning('File deleted')->withAction('Restore', route('files.restore', $file))`. The package handles the button rendering and CSRF protection automatically.
Are there alternatives to Laravel Notify for Laravel notifications?
Yes, alternatives include `spatie/laravel-notification-directives` (for Blade directives), `laravel-notification-channels` (for email/SMS + UI), or `laravel-flash` for simpler flash messages. Laravel Notify stands out for its Tailwind/Alpine integration and lightweight design.
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.
davejamesmiller/laravel-breadcrumbs
artisanry/parsedown
christhompsontldr/phpsdk
enqueue/dsn
bunny/bunny
enqueue/test
enqueue/null
enqueue/amqp-tools
milesj/emojibase
bower-asset/punycode
bower-asset/inputmask
bower-asset/jquery
bower-asset/yii2-pjax
laravel/nova
spatie/laravel-mailcoach
spatie/laravel-superseeder
laravel/liferaft
nst/json-test-suite
danielmiessler/sec-lists
jackalope/jackalope-transport