{% 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
- No complex configuration needed

### Flexible & Powerful

- Toastr.js - Classic toast notifications
- SweetAlert 2 - Beautiful alert dialogs
- Noty - Highly customizable notifications
- Notyf - Minimalist toast notifications

### Framework Integration

- Native Laravel integration
- Seamless Symfony support
- Works with Livewire and Inertia
- Framework-agnostic core

### Developer Experience

- Full IDE support with autocompletion
- Clear documentation with examples
- TypeScript support
- Easy to customize and extend

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

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

### Join Discussions

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

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 %}