PHP code example of ikkez / f3-flash

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

    

ikkez / f3-flash example snippets


\Flash::instance()->addMessage('You did that wrong.', 'danger');
// or 
\Flash::instance()->addMessage('It worked!', 'success');

$flash = \Flash::instance()
$f3->set('FLASH', $flash);
$flash->setKey('highlight','bg-success'); // with value
$flash->setKey('show-hint'); // without returns just TRUE
$flash->setKey('error','Catastrophic error occured! ');