PHP code example of retinens / laravel-toastr

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

    

retinens / laravel-toastr example snippets


return [
    /*
     * Defines the default auto_hide parameter
     */
    'auto_hide' => false,

    /*
     * Defines the position of the toast on the window
     */

    // "top" or "bottom"
    "position_y" => 'bottom',
    // "start" or "end"
    "position_x" => 'end',
];

public function update()
{
    //do stuff
    toastr('Post edited!');
    return redirect(route('posts.index'));
}

toastr('message','level','title')
bash
php artisan vendor:publish --tag="laravel-toastr-config"
bash
php artisan vendor:publish --tag="laravel-toastr-views"