PHP code example of queued / toasts

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

    

queued / toasts example snippets


// example function in your controller
public function create()
{
    toast('Your post was created!');
    return back();
}

/*
 * Level can be one of the following:
 *   'success'
 *   'error'
 *   'warning'
 *   'info'
 */
toast('message', 'level', 'title');

toast('Welcome Aboard!');

return home();

toast('Sorry! Please try again.')->error();

return home();

toast()->overlay('You are now a Laracasts member!', 'Yay');

return home();

toast('Message 1');
toast('Message 2')->important();

return redirect('somewhere');
bash
php artisan vendor:publish --provider="Queued\Toasts\ToastServiceProvider"