06
OctPHPFlasher gives a straightforward way to give feedback messages on the current or the next page to users with a flashing system.
The flashing system basically makes it possible to record a message and store it within the session so that it can be retrieved when needed.
PHP Flasher helps you to add flash notifications to your PHP projects. This library was developed with the idea that you should be able to add flash notifications to your application with ease and with few lines of code. No application-wide rewrites and no big investments upfront.
PHPFlasher supports many notification libraries: tailwindcss, bootstrap, toastr.js, sweet alert 2, pnotify, noty, notyf, and even shows desktop notifications.
This library is designed, so you can take full control when creating your notifications :
Quick start guide for installing the PHPFlasher from CDN or npm.
To pull in the PHPFlasher via CDN, grab the latest version from jsdelivr.
<script defer src="https://cdn.jsdelivr.net/npm/@flasher/flasher@1.1.1/dist/flasher.min.js"></script>
npm
To install PHPFlasher from npm, use the following command:
npm i @flasher/flasher
import flasher from "@flasher/flasher";
window.flasher = flasher; // only if you want to use it globally
flasher.error("Oops! Something went wrong!");
flasher.warning("Are you sure you want to proceed ?");
flasher.success("Data has been saved successfully!");
flasher.info("Welcome back");
or if you are using a CDN like this:
<script defer src="https://cdn.jsdelivr.net/npm/@flasher/flasher@1.1.1/dist/flasher.min.js"></script>
<script>
flasher.error("Oops! Something went wrong!");
flasher.warning("Are you sure you want to proceed ?");
flasher.success("Data has been saved successfully!");
flasher.info("Welcome back");
</script>
By following the above-given instructions you can learn the basic use of Php Flasher. But if you want to dig more you can visit its detailed documentation and View the source code on Github.
Published at : 06-10-2022
I am a highly results-driven professional with 12+ years of collective experience in the grounds of web application development especially in laravel, native android application development in java, and desktop application development in the dot net framework. Now managing a team of expert developers at Codebrisk.
Launch project