Laravel package to launch toast notifications.

1.0.1 2022-03-14 00:26 UTC

This package is auto-updated.

Last update: 2022-06-14 01:00:02 UTC


Latest Stable Version Total Downloads Latest Unstable Version License

This package provides assistance when using toast notifications. Using the iziTOAST package, which allows us to launch elegant and responsive notifications, having the facility to apply a number of configurations that you will find available on their official site .



Step 1: Composer

Run this command line in console.

composer require tonystore/livewire-notification

Step 2: Include component

Add the iziTOAST CDN styles and script, and the component containing the script to launch the notifications.

    <link href="" rel="stylesheet" type="text/css" />

    <script src="">


       <x-livewire-notification::toast />


    @component('livewire-notification::components.toast') @endcomponent

Publish Config File

php artisan vendor:publish --provider="Tonystore\LivewireNotification\LivewireNotificationProvider" --tag="config"

Default configuration


return [
    'toast' => [
        'title' => '', //Defaut Title
        'position' => 'topRight', //Defaut Position
        'timeout' => 3000, //Display Time
        'modal' => null, //Very important, it defines if an event is triggered to close a Bootstrap modal.


Now, in any Livewire component, you can launch notifications. To launch a notification you can choose between the different types available:

  • success
  • info
  • error
  • warning

Example 1

Launch a simple notification with a personalized message.

        'Example of notification.',

Example 2

Example of notification with modal event.

$this->alert('info','Example of notification with modal event', [
        'modal' => '#hideModal'

To use more configurations, you can check the documentation on their official site .