This is a livewire toast package for laravel.
You can install the package via composer:
composer require ccsliinc/livewire-toast
You can publish the config file with:
php artisan vendor:publish --tag="livewire-toast-config"
This is the contents of the published config file:
return [
/**
* Default delay in ms for automatic close;
*/
'delay' => '5000',
/**
* Position of toast.
*
* 'top-left'
* 'top-center'
* 'top-right'
* 'middle-left'
* 'middle-center'
* 'middle-right'
* 'bottom-left'
* 'bottom-center'
* 'bottom-right'
*/
'position' => 'bottom-right',
/**
* Percentage
*/
'opacity' => 85,
];
Optionally, you can publish the views using
php artisan vendor:publish --tag="livewire-toast-views"
1. Add @include('livewire-toast::notification') in your template.
2. On any livewire component call:
$this->notify('Message', 'Title', 'Second Title', 'type');
- Message - The message to display.
- Title - The title of the toast.
- Secondary Title - Small text after the title.
- Toast Type - Options : success, info, error, warning
composer test
- Create proper component transitions (in/out)
- Support multiple css frameworks
- Do Dusk testing
Please see CHANGELOG for more information on what has changed recently.
The MIT License (MIT). Please see License File for more information.