Download the PHP package kevsuarez/livewire-notiflix without Composer
On this page you can find all versions of the php package kevsuarez/livewire-notiflix. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download kevsuarez/livewire-notiflix
More information about kevsuarez/livewire-notiflix
Files in kevsuarez/livewire-notiflix
Package livewire-notiflix
Short Description Notiflix Wrapper for Livewire
License MIT
Homepage https://github.com/kevsuarez/livewire-notiflix
Informations about the package livewire-notiflix
Livewire Notiflix
This package provides the non-blocking notifications and pop-up boxes utilities for your livewire components.
Currently using notiflix library under the hood.
You can now use your favorite notiflix library without writing any custom Javascript.
Installation
You can install the package via composer:
Requirements
This package uses livewire/livewire
under the hood. Please make sure you include it in your dependencies before using this package.
Register Service Provider
The service provider will automatically get registered. Or you may manually add the service provider in your config/app.php
file:
Publish Config File
This package publishes a config/livewire-notiflix.php
file:
Usage
Insert notiflix and livewire notiflix scripts directive after livewire scripts directive.
NOTE: Notiflix script is not included by default so make sure you include it before @livewireNotiflixScripts
1
: Notify
Params
Example
Using Callback
First, setup your action method for onNotifyClick callback. Of course you can name your method anything you want.
Make sure you register onNotifyClick method as event listeners. See: Events | Laravel Livewire for more information about event listeners.
Finally, create an action method that triggers the notify box with onNotifyClick callback pointed to the event listeners you registered.
2
: Alert (Report)
Params
Example
Using Callback
First, setup your action method for onAlertClick callback. Of course you can name your method anything you want.
Make sure you register onAlertClick method as event listeners. See: Events | Laravel Livewire for more information about event listeners.
Finally, create an action method that triggers the alert box with onAlertClick callback pointed to the event listeners you registered.
3
: Flash
Params
Example
NOTE: Callback is enabled for both modes.
4
: Confirm
Params
Example
First, setup your action methods for confirmed and cancelled (optional) callback. Of course you can name your methods anything you want.
Make sure you register onConfirmed and onCancelled methods as event listeners. See: Events | Laravel Livewire for more information about event listeners.
Finally, create an action method that triggers the confirmation box with onConfirmed and onCancelled callbacks pointed to the event listeners you registered.
5
: Ask
Params
Example
First, setup your action methods for onAskConfirmed and onAskCancelled (optional) callback. Of course you can name your methods anything you want.
Make sure you register onAskConfirmed and onAskCancelled methods as event listeners. See: Events | Laravel Livewire for more information about event listeners.
Finally, create an action method that triggers the confirmation box with onAskConfirmed and onAskCancelled callbacks pointed to the event listeners you registered.
Testing
Changelog
Please see CHANGELOG for more information what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
Credits
- Kevin Suárez
- All Contributors
Copyright
Copyright © Kevin Suárez
License
Livewire Notiflix is open-sourced software licensed under the MIT license.
All versions of livewire-notiflix with dependencies
illuminate/support Version ^6.0|^7.0|^8.0
livewire/livewire Version ^2.0