PHP code example of aliowa / livewire-toasts

1. Go to this page and download the library: Download aliowa/livewire-toasts 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/ */

    

aliowa / livewire-toasts example snippets




namespace App\Http\Livewire;

use Aliowa\LivewireToasts\Traits\Toastable;
use Livewire\Component;

class SavePost extends Component
{
    use Toastable;

    //component code
}

public function savePost()
{
    $this->toastSuccess('Post has been successfully saved!');

    $this->toastWarning('You have reached the daily post limit!');

    $this->toastDanger('Post has not been saved!');

    $this->toastInfo('A confirmation email has been sent');
}
js
module.exports = {
    content: [
        './vendor/aliowa/**/views/**/*.blade.php',
    ],
console
php artisan vendor:publish --tag=aliowa-livewire-toasts:views