Download the PHP package devrabiul/laravel-toaster-magic without Composer
On this page you can find all versions of the php package devrabiul/laravel-toaster-magic. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download devrabiul/laravel-toaster-magic
More information about devrabiul/laravel-toaster-magic
Files in devrabiul/laravel-toaster-magic
Package laravel-toaster-magic
Short Description Laravel Toaster Magic is a lightweight, flexible toast library for Laravel projects, with no jQuery, Bootstrap, or Tailwind dependency.
License MIT
Homepage https://github.com/devrabiul/laravel-toaster-magic
Rated 5.00 based on 1 reviews
Informations about the package laravel-toaster-magic
π ToastMagic - Laravel Toaster (With Livewire v3 Support)
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
- Live Demo
- Features
- Installation
- Usage
- 1. Basic Setup
- 2. Usage in Controller
- 3. Usage in JavaScript (Optional)
- 4. Livewire v3 Support
- Alternative Syntax & Fluent API
- Toast Position Options
- Get Started Today
- Contributing
- License
- 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' => true
to 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:
π§© 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 |
π― 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]