{% include head.html %}
{% include size-helper.html %} {% include banner.html %} {% include header.html %}

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

Get Started View on GitHub
{% 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?

Everything you need to add beautiful notifications to your PHP applications

### Easy to Use

- Simple one-line code to show notifications
- Works right out of the box - zero configuration
- Auto-detects frontend framework
- Intuitive, consistent API across libraries

### Flexible & Powerful

- Multiple notification libraries in one package
- Session and direct rendering options
- Customizable positions, animations, and styles
- Flash messages across redirects

### Framework Integration

- Native Laravel integration with facades
- Seamless Symfony support with bundle
- Livewire real-time notifications
- Inertia.js SPA support

### Developer Experience

- Full IDE support with autocompletion
- Extensive documentation with examples
- TypeScript support for JavaScript usage
- Well-tested, production-ready code

### Performance Optimized

- Lightweight core with lazy-loading
- Only loads required JavaScript libraries
- Optimized asset loading strategies
- Minimal framework overhead

### Highly Customizable

- Easily style notifications to match your brand
- Configure default settings globally
- Override options per notification
- Create custom themes and templates

Libraries

## Choose Your Preferred Library

PHPFlasher integrates with popular JavaScript notification libraries

### Toastr.js

Simple toast notifications for web applications. Clean, elegant and customizable.

Learn more

### SweetAlert2

Beautiful, responsive, customizable alert dialogs with interactive elements.

Learn more

### Noty

Highly customizable notification library with multiple positions and animations.

Learn more

### Notyf

Minimalist toast notifications with a clean design and smooth animations.

Learn more
Compare all libraries
Code Examples

## Simple Implementation

Just a few lines of code to get started

Controller.php

    namespace App\Http\Controllers;

    class ProfileController extends Controller
    {
        public function update(Request $request)
        {
            // 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');

            // 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);
        }
    });

Testimonials

## Loved by Developers

See what others are saying about PHPFlasher

> "Honestly wasn't expecting much, but wow! Saved me hours of headaches with our notification system. Just dropped it in and it worked first try. No more fighting with JS libraries!"

Salma Mourad
@salmayno · Freelancer

> "We were using Toastr directly but it was a mess maintaining it. Switched to PHPFlasher last sprint and it just works. The Livewire integration is a huge time saver too. Only nitpick is I wish the docs had more examples."

Youness AIT EL HADJ
@yae96 · Lead Dev

> "Been using PHPFlasher in our Symfony app for 6+ months. Had an issue with modal stacking, reached out on GitHub and got a fix in like 2 days! That kind of support is rare for open source. Huge thanks to @younes!"

Youssef Saoubou
@youssefsaoubou · Backend Dev
Community

## Join Our Growing Community

Help us make PHPFlasher even better

### Star on GitHub

Contribute to the project, report issues, or suggest new features.

Star Project

### Join Discussions

Ask questions, share ideas, and connect with other developers.

Participate

### Read Documentation

Explore comprehensive guides, examples, and API reference.

Get Started

## Ready to Enhance Your PHP Applications?

Add beautiful notifications to your Laravel or Symfony applications in minutes with PHPFlasher.

Get Started Star on GitHub
Support

## Compatible Everywhere

Chrome
Firefox
Safari
Edge
Mobile
Dark Mode
{% include footer.html %} {% include scripts.html %}