PHP code example of martynbiz / php-flash-message

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

    

martynbiz / php-flash-message example snippets


"    "martynbiz/php-flash-message": "dev-master"
}

$flash = new \MartynBiz\FlashMessage\Flash;
$flash->addMessage('success', 'You have successfully registered');

$flash->has('success'); // true
$flash->has('errors'); // false

$messages = $flash->flushMessages();

$container = new Zend\Session\Container('mycontainer');
$flash = new Flash($container);