Download the PHP package juanrube/laravel-toast-magic-8 without Composer
On this page you can find all versions of the php package juanrube/laravel-toast-magic-8. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download juanrube/laravel-toast-magic-8
More information about juanrube/laravel-toast-magic-8
Files in juanrube/laravel-toast-magic-8
Package laravel-toast-magic-8
Short Description Laravel Toaster Magic is a lightweight, flexible toast library for Laravel projects, with no jQuery, Bootstrap, or Tailwind dependency.
License MIT
Informations about the package laravel-toast-magic-8
π ToastMagic - Laravel Toaster (With Livewire v3 Support)
this is a fork adapted to Laravel8 and PHP < 8
Laravel Toaster Magic is a lightweight and flexible toast notification package for Laravel applications β built with zero dependencies on jQuery, Bootstrap, or Tailwind. Itβs fully compatible with Livewire, supports custom events, and now features a Material-inspired design for a modern UX out of the box.
π Table of Contents
- π ToastMagic - Laravel Toaster (With Livewire v3 Support)
- this is a fork adapted to Laravel8 and PHP \< 8
- π Table of Contents
- π Live Demo
- β¨ Features
- π¦ Installation
- βοΈ Usage
- 1. Basic Setup
- 2. Usage in Controller
- 3. Usage in JavaScript (Optional)
- 4. β Livewire v3 Support
- 5. β Themes
- 6. π¨ Enabling Color Mode
- 7. π¨ Enabling Gradient Mode
- π§© Alternative Syntax \& Fluent API
- πΉ Static Method (Quick)
- πΉ Fluent Syntax (Advanced)
- π Toast Position Options
- π Enable Dark Mode
- π― Get Started Today!
- π€ Contributing
- π License
- π± Treeware
- π¬ Contact
π Live Demo
![]()
β¨ Features
- π₯ Easy-to-Use β Simple and intuitive toast notifications for Laravel.
- π RTL Support β Full compatibility with right-to-left (RTL) languages.
- π Dark Mode β Seamless dark mode integration.
- π¨ Customizable β Tailor toasts with various styles, buttons, and positions.
- β‘ Livewire v3 Ready β Fully supports Livewire v3 with event-based dispatching.
π¦ Installation
Install the package via Composer:
`
Then publish the package assets:
βοΈ Usage
1. Basic Setup
Include the necessary assets in your layout Blade template:
In the <head> section:
Before the closing </body> tag:
Example:
2. Usage in Controller
Trigger toast notifications from your controllers using the ToastMagic facade:
3. Usage in JavaScript (Optional)
Use ToastMagic directly in JavaScript (for AJAX responses, etc.):
4. β Livewire v3 Support
Enable Livewire support by updating your config file:
- Set
'livewire_enabled' => trueto activate Livewire integration. - Set
'livewire_version' => 'v3'to specify the Livewire version.
Dispatch toast notifications from Livewire components:
Supported status types: success, info, warning, error
5. β Themes
Change Theme by updating your config file:
6. π¨ Enabling Color Mode
ToastMagic supports a color mode that dynamically applies toast colors based on the toast type (success, error, warning, info). This makes your notifications visually consistent and meaningful without manually specifying colors or themes.
Enable color mode in your configuration file config/laravel-toaster-magic.php:
7. π¨ Enabling Gradient Mode
Laravel Toaster Magic now supports a gradient mode, which dynamically applies toast colors based on the toast type (success, error, warning, info). This ensures that your notifications are visually consistent and meaningful without manually specifying colors or themes.
To enable gradient mode, update your configuration file config/laravel-toaster-magic.php:
Note: Gradient mode works only with the default and material themes.
π§© Alternative Syntax & Fluent API
ToastMagic provides both simple and advanced APIs to suit your style.
πΉ Static Method (Quick)
πΉ Fluent Syntax (Advanced)
π Toast Position Options
Customize toast display position using any of the following:
| Position | Description |
|---|---|
toast-top-start |
Top left corner |
toast-top-end |
Top right corner (default) |
toast-top-center |
Top center |
toast-bottom-start |
Bottom left corner |
toast-bottom-end |
Bottom right corner |
toast-bottom-center |
Bottom center |
π Enable Dark Mode
Add theme="dark" to your <body> tag to automatically enable dark mode.
π― Get Started Today!
Experience the magic of ToastMagic and enrich your Laravel application with modern, elegant toast notifications.
- π GitHub: devrabiul/laravel-toaster-magic
- π Live Demo: laravel-toaster-magic.rixetbd.com
- π Packagist: packagist.org/packages/devrabiul/laravel-toaster-magic
π€ Contributing
We welcome contributions! Please fork the repository, make your changes, and submit a pull request. For feature requests or issues, open a GitHub issue.
π License
This package is open-source software licensed under the MIT license.
π± Treeware
This package is Treeware. If you use it in production, then we ask that you buy the world a tree to thank us for our work. By contributing to the Treeware forest youβll be creating employment for local families and restoring wildlife habitats.
π¬ Contact
For support or inquiries, feel free to reach out: π§ [email protected]