1. Go to this page and download the library: Download bkstar123/flashing 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/ */
// Flash a info-typed message by default
\Flashing::message('Welcome to the home page')
->flash();
flashing('Welcome to the home page')
->flash();
// Flash a success-typed message
\Flashing::message('Welcome to the home page')
->success()
->flash();
flashing('Welcome to the home page')
->success()
->flash();
// Flash a message and mark it as important i.e it will not disappear until being dismissed by yourself
\Flashing::message('Important message')
->important()
->flash();
flashing('Important message')
->important()
->flash();
// Specify the miliseconds for timing out the flash message
// The given timeout will be ignored if you mark the flash message as important
\Flashing::message('This message will disappear after 3 seconds')
->timeout(3000)
->flash();
flashing('This message will disappear after 3 seconds')
->timeout(3000)
->flash();
// Specify the location of the flash message, it can be either top-right or bottom-right
\Flashing::message('I will be on the top-right of your screen')
->position('top')
->flash();
flashing('I will be on the top-right of your screen')
->position('top')
->flash();