Laravel package to launch toast notifications.

Last update: Mar 14, 2022

Laravel package to launch toast notifications.

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 .

REQUIREMENTS

INSTALLATION VIA COMPOSER

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.

... @livewireScripts ... ... //INSERT COMPONENT //OR @component('livewire-notification::components.toast') @endcomponent ">
    
 "https://cdn.jsdelivr.net/npm/[email protected]/dist/css/iziToast.min.css" rel="stylesheet" type="text/css" />


  
    ...
    @livewireScripts
    ...
    
    ...

    //INSERT COMPONENT

       

    //OR

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

Publish Config File

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

Default configuration

//config/livewire-notification

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.
    ],

Usage

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.

$this->alert(
        'success',
        '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 .

GitHub

https://github.com/tony98ms/livewire-notification
You might also like...

✈️ Whatsapp Notifications Channel for Laravel

Whatsapp Notifications Channel for Laravel This package makes it easy to send Whatsapp notification using Venom API with Laravel. This package was cre

Apr 27, 2022

Send Firebase push notifications with Laravel php framework.

FCM Notification Channel for Laravel Send Firebase push notifications with Laravel php framework. Installation You can install this package via compos

May 21, 2022

Standalone PHP library for easy devices notifications push.

NotificationPusher Standalone PHP library for easy devices message notifications push. Feel free to contribute! Thanks. Contributors Cédric Dugat (Aut

May 9, 2022

:computer: Send notifications to your desktop directly from your PHP script

:computer: Send notifications to your desktop directly from your PHP script

About JoliNotif JoliNotif is a cross-platform PHP library to display desktop notifications. It works on Linux, Windows or MacOS. Requires PHP = 7.2 (

May 12, 2022

A very lightweight library to handle notifications the smart way.

A very lightweight library to handle notifications the smart way.

NAMSHI | Notificator Notificator is a very simple and lightweight library to handle notifications the smart way. It took inspiration from other librar

May 9, 2022

Takes care of Apple push notifications (APNS) in your PHP projects.

Notificato Notificato takes care of push notifications in your PHP projects. Italian: notificato è: participio passato English: notified Why use Notif

Apr 17, 2022

A PHP Library to easily send push notifications with the Pushwoosh REST Web Services.

php-pushwoosh A PHP Library to easily send push notifications with the Pushwoosh REST Web Services. First sample, creating a Pushwoosh message // Crea

Jan 27, 2022

Notifications in PHP (notify-send, growl, etc) like that.

#Nod Notifications in PHP (notify-send, growl, etc) like that. ##Examples Letting Nod figure out the best Adapter to use (not recommend ATM, only work

Mar 26, 2019

Sends notifications via one or more channels (email, SMS, ...).

Notifier Component The Notifier component sends notifications via one or more channels (email, SMS, ...). Resources Documentation Contributing Report

May 21, 2022
A Toast notification library for the Laravel TALL stack.
A Toast notification library for the Laravel TALL stack.

A Toast notification library for the Laravel TALL stack. You can push notifications from the backend or frontend to render customizable toasts with almost zero footprint on the published CSS/JS ????

May 20, 2022
Larafirebase is a package thats offers you to send push notifications or custom messages via Firebase in Laravel.
Larafirebase is a package thats offers you to send push notifications or custom messages via Firebase in Laravel.

Introduction Larafirebase is a package thats offers you to send push notifications or custom messages via Firebase in Laravel. Firebase Cloud Messagin

May 6, 2022
A package to simplify automating future notifications and reminders in Laravel
A package to simplify automating future notifications and reminders in Laravel

Laravel Snooze Schedule future notifications and reminders in Laravel Why use this package? Ever wanted to schedule a future notification to go out at

May 11, 2022
Laravel package to enable sending push notifications to devices

Laravel Push Notification Package to enable sending push notifications to devices Installation Update your composer.json file to include this package

Apr 25, 2022
This package allows you to send notifications to Microsoft Teams.
This package allows you to send notifications to Microsoft Teams.

Teams connector This package allows you to send notifications to Microsoft Teams. Installation You can install the package using the Composer package

May 6, 2022
Laravel Security Notifications

This package adds security notifications to warn your users when significant security events occur so that they aren't the next victim of an attacker.

Feb 8, 2022
Laravel Subscribable Notifications

Laravel Subscribable Notifications This package allows you to subscribe your app Users to your app Notifications and dispatch them without specifying

Mar 18, 2022
Flexible Flash notifications for Laravel
Flexible Flash notifications for Laravel

Introduction Laravel Notify is a package that lets you add custom notifications to your project. A diverse range of notification design is available.

May 23, 2022
📨 Facebook Notifications Channel for Laravel
📨 Facebook Notifications Channel for Laravel

Facebook Notifications Channel for Laravel This package makes it easy to send notifications using the Facebook Messenger with Laravel. Contents Instal

Apr 13, 2022
Push Notifications using Laravel
Push Notifications using Laravel

laravel-push-notification Push Notifications using Laravel PushNotification::send(['deviceToken1', 'deviceToken2',..], 'Notification Message', 'Action

Apr 6, 2022