Palestinian Flag Solidarity with Palestine. We seek justice and peace, and strongly oppose all forms of injustice and genocide.
Enjoying PHPFlasher? Show your support with a star on GitHub! Thank you

Beautiful Flash Notifications Made Simple

Add elegant notifications to your Laravel or Symfony applications with just one line of code. Perfect for developers of all skill levels.

Quick Presets

Common use cases
PHPFlasher Studio
Ready
Step 1: Choose Type
Step 2: Customize Message
Optional
Step 3: Advanced Options
Generated Code
Copy-paste into your project
Customize your perfect notification in seconds
Get Started

Quick Installation

Get up and running in less than a minute

Features

Why Choose PHPFlasher?

The modern notification library for PHP developers

One-Line API

Show beautiful notifications with a single line of code. Zero configuration required.

Framework Ready

Native support for Laravel, Symfony, Livewire, and Inertia.js out of the box.

Library Agnostic

Works with SweetAlert2, Toastr, Noty, Pnotify, and more. Switch anytime.

TypeScript Support

Full TypeScript definitions with IDE autocomplete for a better DX.

Zero Config

Install and use immediately. Sensible defaults that work out of the box.

Production Ready

Battle-tested in production. Comprehensive test coverage and reliable.

6+
Framework Integrations
5+
Notification Libraries
10+
Available Themes
100%
TypeScript Coverage
Libraries

Choose Your Preferred Library

Seamlessly integrate with the notification library you already love

Code Examples

Simple Implementation

Just a few lines of code to get started

Controller.php
<?php

namespace App\Http\Controllers;

class ProfileController
{
    public function update()
    {
        // Update user profile logic

        // Show success notification
        flash()->success('Profile updated successfully!');

        // Or add a title
        flash()->success('Your changes have been saved.', 'Profile Updated');

        // Or add a title and options
        flash()
            ->option('timeout', 5000)
            ->option('position', 'top-right')
            ->success('Changes saved with custom settings');

        // Change notification options
        flash()->options([
            'timeout' => 5000,
            'position' => 'top-right'
        ])->success('Changes saved with custom settings');

        return back();
    }
}
app.js
// Form submission example
document.getElementById('contact-form').addEventListener('submit', async function(e) {
    e.preventDefault();

    try {
        const response = await submitForm(this);

        if (response.success) {
            // Show success notification
            flasher.success('Your message has been sent!', 'Thank You');
        } else {
            // Show error notification
            flasher.error('Please check your form inputs', 'Error');
        }
    } catch (error) {
        // Show error notification with details
        flasher.error('Server error, please try again later.', 'Error');
        console.error(error);
    }
});