PHP code example of xuzh / toastr_flash

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

    

xuzh / toastr_flash example snippets


'providers' => [
    Laracasts\Flash\FlashServiceProvider::class,
];

'aliases' => [
    'Flash' => Laracasts\Flash\Flash:class,
];

public function store()
{
    Flash::message('Welcome Aboard!');

    return Redirect::home();
}

/**
 * Destroy the user's session (logout).
 *
 * @return Response
 */
public function destroy()
{
    Auth::logout();

    flash()->success('You have been logged out.');

    return home();
}

Flash::message('Welcome aboard!');

return Redirect::home();

Flash::error('Sorry! Please try again.');

return Redirect::home();

Flash::overlay('You are now a Laracasts member!');

return Redirect::home();
bash
php artisan vendor:publish