PHP code example of dotkernel / dot-flashmessenger
1. Go to this page and download the library: Download dotkernel/dot-flashmessenger 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/ */
$this->flashMessenger->addMessage('error', 'This is a error flash message');
//on the next request you can get all messages from a namespace, or all messages from all namespaces if namespace is omitted
$this->flashMessenger->getMessages('error');
$this->flashMessenger->addData('myData', $someData);
// next request
$this->flashMessenger->getData('myData');