| [ Web Proxy ] |
| Viewing: https://php-flasher.io/javascript | [Back] [Original] |
[Palestinian Flag] Solidarity with Palestine.
We seek justice and peace, and strongly oppose all forms of injustice and genocide.
PHPFlasher assets can be installed from a CDN or using npm
Quick start guide for installing the PHPFlasher from cdn or npm.
To pull in the PHPFlasher via CDN, grab the latest version from jsdelivr
[cdn-jsdelivr]
[flasher.min.js.svg]
<script defer src="https://cdn.jsdelivr.net/npm/@flasher/[email protected]/dist/flasher.min.js"></script>
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/[email protected]/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>
First grab the CDN for any js library adapter supported by PHPFlasher or install it with npm
and then call the create() method on flasher object :
<script defer src="https://cdn.jsdelivr.net/npm/@flasher/[email protected]/dist/flasher.min.js"></script>
<script defer src="https://cdn.jsdelivr.net/npm/@flasher/[email protected]/dist/flasher-toastr.min.js"></script>
<script>
const factory = flasher.use('toastr');
factory.error("Oops! Something went wrong!");
factory.warning("Are you sure you want to proceed ?");
factory.success("Data has been saved successfully!");
factory.info("Welcome back");
// or simply with
flasher.toastr.error("Oops! Something went wrong!");
flasher.toastr.warning("Are you sure you want to proceed ?");
flasher.toastr.success("Data has been saved successfully!");
flasher.toastr.info("Welcome back");
</script>
A powerful & easy-to-use package for adding flash messages to Laravel or Symfony projects. Provides feedback to users, improves engagement & enhances user experience.
2026 PHPFlasher. Released under the MIT License.
| Web Proxy Viewer | New URL | Original Page |