PHP code example of ccsliinc / livewire-toast

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

    

ccsliinc / livewire-toast example snippets


return [
    /**
     *  Default delay in ms for automatic close;
     */
    'delay' => '5000',

    /**
     *  Position of toast.
     *
     * 'top-left'
     * 'top-center'
     * 'top-right'
     * 'middle-left'
     * 'middle-center'
     * 'middle-right'
     * 'bottom-left'
     * 'bottom-center'
     * 'bottom-right'
     */
    'position' => 'bottom-right',

    /**
     * Percentage
     */
    'opacity' => 85,
];

 1. Add @ny livewire component call:
 
    $this->notify('Message', 'Title', 'Second Title', 'type');
bash
php artisan vendor:publish --tag="livewire-toast-config"
bash
php artisan vendor:publish --tag="livewire-toast-views"