PHP code example of limatheus / livewire-notifier-ext
1. Go to this page and download the library: Download limatheus/livewire-notifier-ext 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/ */
limatheus / livewire-notifier-ext 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'));
}