1. Go to this page and download the library: Download gloudemans/notify 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/ */
use AddsNotifications;
public function yourMethod()
{
$this->notify()->success(...); // Also info(), warning(), error()
$this->notifySuccess(...);
$this->notifyInfo(...);
$this->notifyWarning(...);
$this->notifyError(...);
}
/**
* Render the notifications as HTML/JavaScript
*
* @param array $notifications
* @return string
*/
public function render(array $notifications);