PHP code example of epjansson / flasher

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

    

epjansson / flasher example snippets


$this->setShared('flasher', function() {
    $flasher = new \Epj\Flasher();
    $flasher->setOptions(

// You can start session in webroot/config_with_app.php
$app->session();

$this->di->flasher->get();

if(isset($flash_message)) echo $flash_message;
$this->views->render('flash_message');

$app->flasher->success("This is a flash message of the type 'success'");