PHP code example of krubio / perfect-flash-bs-5

1. Go to this page and download the library: Download krubio/perfect-flash-bs-5 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/ */

    

krubio / perfect-flash-bs-5 example snippets


use PerfectApp\Session\SessionInterface;
use PerfectApp\Bootstrap5FlashMessage;

$session = new Session();  // This should implement SessionInterface
$messages = [
    'success' => [
        'insert' => 'Record Inserted'
    ],
    'danger' => [
        'failed_login' => 'Invalid Login'
    ]
];

$flash = new Bootstrap5FlashMessage($session, $messages);

$flash->addMessage('success', 'insert');

$flash->addMessage('danger', 'failed_login', 'bi-x-circle', true);

$flash->displayMessages();
bash
php vendor/bin/codecept run --coverage --coverage-html  --coverage-xml