1. Go to this page and download the library: Download codespb/livewire-notifier library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
codespb / livewire-notifier example snippets
bash
$ php artisan livewire-notifier:install
php
public function save(){
...
$this->emitTo('notifier','message',['text'=>__('The post is saved!')]);
}
php
public function save(){
...
session()->flash('notifier',['text'=>__('The post is saved!')]);
return $this->redirect(route('posts'));
}