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 Toaster Magic Laravel Package

devrabiul/laravel-toaster-magic

View on GitHub
Deep Wiki
Context7
v2.0

🌟 One Package, Infinite Possibilities

Laravel Toaster Magic is designed to be the only toaster package you'll need for any type of Laravel project. Whether you are building a corporate dashboard, a modern SaaS, a gaming platform, or a simple blog, I have crafted a theme that fits perfectly.

"One Package, Many Themes." β€” No need to switch libraries just to change the look.

This major release brings 7 stunning new themes, full Livewire v3/v4 support, and modern UI enhancements.


πŸš€ What's New?

1. 🎨 7 Beautiful New Themes

I have completely redesigned the visual experience. You can now switch between 7 distinct themes by simply updating your config.

Theme Config Value Description
Default 'default' Clean, professional, and perfect for corporate apps.
Material 'material' Google Material Design inspired. Flat and bold.
iOS 'ios' (Fan Favorite) Apple-style notifications with backdrop blur and smooth bounce animations.
Glassmorphism 'glassmorphism' Trendy frosted glass effect with vibrant borders and semi-transparent backgrounds.
Neon 'neon' (Dark Mode Best) Cyberpunk-inspired with glowing neon borders and dark gradients.
Minimal 'minimal' Ultra-clean, distraction-free design with simple left-border accents.
Neumorphism 'neumorphism' Soft UI design with 3D embossed/debossed plastic-like shadows.

πŸ‘‰ How to use:

// config/laravel-toaster-magic.php
'theme' => 'neon', 

2. ⚑ Full Livewire v3 & v4 Support

I've rewritten the Javascript core to support Livewire v3 & v4 natively.

  • No more custom event listeners required manually.
  • Uses Livewire.on (v3) or standard event dispatching.
  • Works seamlessly with SPA mode and wire:navigate.
// Dispatch from component
$this->dispatch('toastMagic', 
    status: 'success', 
    message: 'User Saved!', 
    title: 'Great Job'
);

3. 🌈 Gradient Mode

Want your toasts to pop without changing the entire theme? Enable Gradient Mode to add a subtle "glow-from-within" gradient based on the toast type (Success, Error, etc.).

// config/laravel-toaster-magic.php
'gradient_enable' => true

Works best with Default, Material, Neon, and Glassmorphism themes.


4. 🎨 Color Mode

Don't want themes? Just want solid colors? Color Mode forces the background of the toast to match its type (Green for Success, Red for Error, etc.), overriding theme backgrounds for high-visibility alerts.

// config/laravel-toaster-magic.php
'color_mode' => true

5. πŸ›  Refactored CSS Architecture

I have completely modularized the CSS.

  • CSS Variables: All colors and values are now CSS variables, making runtime customization instant.
  • Scoped Styles: Themes are namespaced (.theme-neon, .theme-ios) to prevent conflicts.
  • Dark Mode: Native dark mode support via body[theme="dark"].

πŸ“‹ Upgrade Guide

Upgrading from v1.x to v2.0?

  1. Update Composer:

    composer require devrabiul/laravel-toaster-magic "^2.0"
    
  2. Check Config: If you have a published config file, add the new options:

    'options' => [
        'theme' => 'default',
        'gradient_enable' => false,
        'color_mode' => false,
    ],
    'livewire_version' => 'v3',
    

🏁 Conclusion

v2.0 transforms Laravel Toaster Magic from a simple notification library into a UI-first experience. Whether you're building a sleek SaaS (use iOS), a gaming platform (use Neon), or an admin dashboard (use Material), there is likely a theme for you.

Enjoy the magic! 🍞✨


v1.6

πŸš€ Laravel Toaster Magic v1.6 Release Notes

πŸ”Ή What’s New

  • JavaScript Stability Fixes: Resolved multiple JS-related issues that could cause inconsistent toast behavior in SPA and dynamic page loads. Toasts now render more reliably across Livewire, Alpine.js, and AJAX-driven views.

  • Improved Event Handling: Fixed edge cases where custom events were not always triggering toast notifications. Event listeners are now more predictable and better scoped.

  • DOM Ready & SPA Support: Enhanced initialization logic to ensure Toaster Magic works smoothly with page transitions, including Turbo, Inertia, and Livewire navigation.

  • Performance Tweaks: Reduced unnecessary DOM queries and optimized JS execution flow for faster toast rendering with lower overhead.

  • Backward Compatibility: Fully compatible with v1.5 and earlier versions β€” no breaking changes. Existing integrations continue to work without modification.

  • Documentation Updates: Updated frontend usage examples to reflect the improved JS behavior and best practices.


βœ… Summary

Version 1.6 focuses on frontend reliability and smoother user experience. With important JavaScript fixes and performance improvements, Toaster Magic now delivers more consistent notifications across modern, dynamic Laravel applications.

v1.5

πŸš€ Laravel Toaster Magic v1.5 Release Notes

πŸ”Ή What's New

  • Exception Fallback Handling: Added robust exception handling across all toast operations. Now, unexpected errors are gracefully managed without breaking your application. Developers can also provide custom handlers via configuration.

  • Performance & Optimization: Optimized core toast logic for faster execution. Minified assets and reduced runtime overhead to make the package leaner and more efficient.

  • PHP & Laravel Compatibility: Fully compatible with PHP 8.0 β†’ 8.4 and Laravel 8 β†’ 12. This ensures smooth integration across modern Laravel projects.

  • Backward Compatibility: Upgrading from v1.x is seamless. All previous configurations and usages remain supported.

  • Documentation & Examples: Updated usage examples and configuration instructions for easier integration.

  • All other configurations remain backward-compatible.


βœ… Summary

This release focuses on stability, performance, and developer experience. With v1.5, Laravel Toaster Magic is more robust, optimized, and ready for modern Laravel projects.

v1.4

🌟 Laravel Toaster Magic v1.4 β€” Gradient Effects, Color Mode Fix & Asset Updates

This release brings exciting visual improvements with Gradient Effects, fixes for Color Mode, and reorganizes the asset directory structure for better maintainability and package publishing.


βœ… What's New / Fixed:

  • 🌈 New Feature: Gradient Effects

    • Enable gradient_enable in the config to add smooth gradient backgrounds to all toast notifications.
    • Works in combination with color mode for visually appealing and modern toast designs.
  • 🎨 Fixed Color Mode

    • Resolved issues where color_mode did not apply the correct colors for some toast types (success, error, warning, info).
    • Ensures consistent visual feedback across all toast messages.
  • πŸ“‚ Asset Directory Updates

    • Moved and reorganized package assets for better structure and easier publishing.
    • Improves compatibility with Laravel’s artisan vendor:publish workflow.
  • 🧹 Other Improvements

    • Minor code optimizations and cleanup to enhance stability and maintainability.

βœ… Upgrade Guide:

  1. Update the package:
composer update devrabiul/laravel-toaster-magic
  1. (Optional) Clear config cache:
php artisan config:clear
  1. Enable gradient and color mode in your config file:
// config/laravel-toaster-magic.php
return [
    'options' => [
        'gradient_enable' => true,
        'color_mode' => true,
        // other options...
    ],
    'livewire_enabled' => true,
    'livewire_version' => 'v3',
];
  1. Publish updated assets if necessary:
php artisan vendor:publish --provider="Devrabiul\ToastMagic\ToastMagicServiceProvider"

βœ… Special Thanks

Thanks to all contributors and community members for helping! ❀️


Happy Toasting! 🍞✨

v1.3

🍞 Laravel Toaster Magic v1.3.0 β€” Color Mode & SPA Navigation Fixes

This release introduces a new Color Mode feature that automatically applies toast colors based on toast types, along with important fixes for SPA navigation issues to improve Livewire and frontend routing compatibility.


βœ… What's New / Fixed:

  • 🎨 New Feature: Color Mode

    • Enable color_mode in the config to automatically apply distinct colors for toast types (success, error, warning, info).
    • Provides visually clear, consistent toast feedback without manual color tweaks.
  • πŸ› οΈ Fixed SPA Navigation Issues

    • Resolved toast notifications not showing or duplicating during Single Page Application (SPA) navigations.
    • Improved event handling and lifecycle hooks to better support Livewire v3 and modern SPA setups.
  • 🧹 Other Improvements

    • Enhanced option merging logic for runtime and config settings.
    • Codebase cleanup and minor optimizations for stability.

βœ… Upgrade Guide:

  1. Update the package:
composer update devrabiul/laravel-toaster-magic
  1. (Optional) Clear config cache:
php artisan config:clear
  1. Enable color mode in your config file if you want to use it:
// config/laravel-toaster-magic.php
return [
    'options' => [
        // other options...
        'color_mode' => true,
    ],
    'livewire_enabled' => true,
    'livewire_version' => 'v3',
];

βœ… Special Thanks

Thanks to all community members who helped identify SPA navigation issues and supported the color mode feature development! ❀️


Happy Toasting! 🍞✨

v1.2

🍞 Laravel Toaster Magic v1.2.0 β€” Config Fix + Minor Improvements

This release focuses on fixing the positionClass config issue and includes other small improvements to enhance your experience with Laravel Toaster Magic.


βœ… What's Fixed / Improved:

  • πŸ› οΈ Fixed Default Config – positionClass The default positionClass in config/laravel-toaster-magic.php is now correctly set to:
'positionClass' => 'toast-bottom-start',

If you’ve not published the config, run:

php artisan vendor:publish --provider="Devrabiul\ToastMagic\ToastMagicServiceProvider"

  • ✨ Improved Option Merging Logic Custom options from your config() and runtime calls now merge more reliably.

  • 🧹 Minor Cleanup Small internal cleanups for better code quality.


βœ… Upgrade Guide:

  1. Update package:
composer update devrabiul/laravel-toaster-magic

Or,

composer update
  1. Clear the cache (if needed):
php artisan config:clear

βœ… Special Thanks

Big thanks to [@redredimano](https://github.com/redredimano) for reporting the config issue! ❀️


Happy Toasting! 🍞✨ https://github.com/devrabiul/laravel-toaster-magic

v1.1

πŸ“¦ Release v1.1 Β· Laravel Toaster Magic

I'm excited to announce v1.1 of Laravel Toaster Magic β€” a smooth and powerful toast notification package for Laravel and Livewire.

✨ What's New

  • πŸ”₯ Material Design Theme

    • A fresh new look inspired by Material Design β€” modern, clean, and user-friendly.
    • Improved color scheme and animations to make your toasts more engaging.

πŸ›  Fixes

  • βœ… Auto Asset Update Issue Fixed

    • No more stale assets β€” the package now properly refreshes its CSS/JS assets after updates or deployments.
  • βœ… Livewire JavaScript Compatibility Fixed

    • Resolved issues related to Livewire JS not triggering toast events reliably.
    • Now works seamlessly with Livewire’s wire:navigate and Livewire.on() events.

πŸ”„ Upgrade Guide

  1. Run:

    composer update devrabiul/laravel-toaster-magic
    
  2. (Optional) Re-publish the assets to get the new Material theme:

    php artisan vendor:publish --provider="Devrabiul\ToastMagic\ToastMagicServiceProvider"
    

Thank you for using Laravel Toaster Magic! ⭐️ Star the repo if you find it useful. Contributions and feedback are always welcome!

v1.0.4

ToastMagic v1.0.4 Release Notes β€” Advanced Customization for Livewire Toasts

✨ What's New

  • Custom Button Support in Livewire Toasts: You can now include custom buttons in your Livewire-dispatched toasts. Add a link with custom text directly inside the toast notification using the options parameter:

    $this->dispatch('toastMagic',
        status: 'success',
        title: 'User Created',
        message: 'The user has been successfully created.',
        options: [
            'showCloseBtn' => true,
            'customBtnText' => 'Link Text',
            'customBtnLink' => 'https://demo.com',
        ],
    );
    
  • Improved Option Handling: The toast system now gracefully parses and applies advanced configuration options passed from Livewire, offering more control and flexibility.

πŸ› οΈ Enhancements

  • Better UX with Optional Close Button: Developers can now toggle a close button per toast using showCloseBtn, offering users manual dismissal options.

  • Refined Event Handling: Fine-tuned the way toastMagic events are handled to improve reliability and compatibility across Livewire’s lifecycle events.

v1.0.3

ToastMagic v1.0.3 Release Notes β€” Livewire Support Enhanced

✨ What's Fixed

  • Livewire Script Path Issues Resolved: Fixed loading problems with Livewire v3 JavaScript assets to ensure correct path resolution and smooth integration.

  • Robust Fallbacks for Livewire Scripts: Improved fallback logic for loading core toaster scripts when Livewire assets are unavailable, preventing broken toast notifications.

πŸš€ Improvements

  • Full Livewire v3 Support Added: Seamless integration with Livewire v3 via $this->dispatch('toastMagic', ...) for easy toast notifications directly from Livewire components.

  • Configurable Livewire Settings: New configuration options 'livewire_enabled' => true and 'livewire_version' => 'v3' allow developers to toggle and specify Livewire versions with ease.

  • Enhanced Developer Experience for Livewire Users: Improved asset loading and event dispatching designed to work flawlessly with Livewire’s lifecycle and script management.

v1.0.2

✨ What's Fixed

  • CSS & JS Path Issue on Nginx Servers Resolved: We've fixed a bug where CSS and JS assets were not loading correctly on Nginx environments due to incorrect or relative path issues. Your assets will now load reliably regardless of server configuration.

πŸš€ Improvements

  • Improved Asset Path Handling: Enhanced the way asset paths are generated to ensure better compatibility across various hosting setups, including Nginx, Apache, and others.
v1.0.1

πŸ› οΈ New Release: TailwindCSS Compatibility Fix & CSS Optimization

✨ What's Fixed

  • TailwindCSS Compatibility Issue Resolved:
    We've addressed and fixed issues that caused conflicts with TailwindCSS, ensuring seamless integration and styling consistency across your project.

πŸš€ Improvements

  • Optimized CSS Output:
    We've streamlined the CSS to reduce file size, improve performance, and enhance maintainabilityβ€”resulting in faster load times and a cleaner codebase.
v1.0.0

ToastMagic - Laravel Toaster

A powerful and flexible Toaster package for Laravel applications, designed to enhance user experience with customizable toast notifications.

Features

  • πŸ”₯ Easy-to-Use Toaster Package – Simple and intuitive file management for Laravel.
  • 🌍 RTL Support – Fully compatible with right-to-left (RTL) languages.
  • πŸŒ™ Dark Mode Support – Seamless dark mode for a better user experience.
  • πŸ“¦ Customizable Notifications – Tailor toast messages to fit your application's needs.
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