--- permalink: / description: PHPFlasher is a powerful PHP notification library that makes it simple to add beautiful flash messages to your Laravel or Symfony applications. Perfect for form submissions, API responses, and user interactions. ---

# 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.

{% include flasher-studio.html %}
Get Started

## Quick Installation

Get up and running in less than a minute

Terminal
Installation
Laravel Installation

    composer require php-flasher/flasher-laravel

Symfony Installation

    composer require php-flasher/flasher-symfony

### Laravel Guide

Perfect integration with Laravel's notification system. Get started in minutes.

Learn more

### Symfony Guide

Complete Symfony integration with bundle configuration and services.

Learn more

### Livewire Guide

Real-time notifications in your Laravel Livewire components.

Learn more

### Inertia Guide

Modern SPA notifications with Inertia.js integration.

Learn more
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

### Toastr.js

Simple, elegant toast notifications

### SweetAlert2

Beautiful, responsive alerts

### Noty

Highly customizable notifications

### Notyf

Minimalist toast notifications

Compare All Libraries
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);
        }
    });