PHP code example of kegi / flash-message

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

    

kegi / flash-message example snippets




/*instantiate*/

$flashMessageController = new FlashMessageController(
    new SessionDriver()
);

/*add a message*/

$flashMessageController->success('Yay !');

/*get messages*/

var_dump($flashMessageController->getMessages());