1. Go to this page and download the library: Download gajus/paddy 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/ */
gajus / paddy example snippets
/**
* @param string $namespace Namespace is used if more than one application is using Messenger. Defaults to the SERVER_NAME or "default".
*/
$messenger = new \Gajus\Paddy\Messenger();
/**
* @param string $message
* @param string $namespace Message namespace (success, error or notice).
* @return $this
*/
$messenger->send('Loaded to the Gunwales!');
$messenger->send('There is more grog on the deck!', 'success');
/**
* Return all messages nested under the respective message namespace.
*
* @return array
*/
$messenger->getMessages();
/**
* Check if there are messages under the specified message namespace.
*
* @param string $namespace
* @return boolean
*/
$messenger->has('error');