PHP code example of mckay / flash
1. Go to this page and download the library: Download mckay/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/ */
mckay / flash example snippets
use \McKay\Flash;
Flash::info('Welcome home!');
if ($user->isNearACliff()) {
Flash::warning('Careful, there');
}
$user->takeARandomStep();
Flash::debug('Uh oh?');
if ($user->heartbeat > 0) {
Flash::success('Ok');
} else {
Flash::error('Call an ambulance');
}
<? foreach(Flash::all() as $flash) {