masterro/laravel-flashes

Easy flash messages
28,189 3
Install
composer require masterro/laravel-flashes
Latest Version:v1.7.0
PHP:^7.4|^8.0|^8.5
Laravel:8 – 13
Older releases:5 · 6 · 7
License:MIT
Last Updated:Oct 21, 2026
Links: GitHub  ·  Packagist
Maintainer: MasterRO

Latest Stable Version Total Downloads Latest Unstable Version License

StandWithUkraine

Easy Flash Messages for Laravel

Fast flash message integration.

Installation

From the command line, run:

composer require masterro/laravel-flashes

Usage

Somewhere set the flash message
  • flash("Hello, {$name}!");
  • flash("Hello, {$name}!", 'success');
  • flash()->error($message); // ->success(), ->info(), ->warning(), ->error()
  • flash()->with(['body' => 'My custom body text']); // ->success(), ->info(), ->warning(), ->error()
  • Flash::info('Flash!');
Before closing </body> tag

@include('flash-messages::script')

or implement your own render logic

php artisan vendor:publish --tag=flash-messages-views

Implement notify method (bootstrap-notify example)

Package will trigger window.notify(message, type) global javascript function that you should implement. As an example here is bootstrap-notify implementation:

window.notify = (message, type = 'success', options = {}) => {
    if (type === 'error') {
        type = 'danger';
    }

    return window.$.notify(window._.merge({
        message: message
    }, options), {
        type: type,
        animate: {
            enter: 'animated bounceIn',
            exit: 'animated bounceOut'
        },
        z_index: 9999,
        delay: 7000,
        mouse_over: 'pause',
        offset: {
            x: 20,
            y: 30
        }
    });
};

It requires bootstrap, bootstrap-notify and animate.css You can install and require those with yarn or npm:

yarn add bootstrap-notify or npm i bootstrap-notify --save

Related Packages

devmarketer/laraflash

A powerful and flexible flash notifications system. Improving over built-in Lara...

11,571 64
codenest/ahem

A simple laravel packege for creating, managing and displaying single and multip...

25 4
edvinaskrucas/notification

Package for Laravel for helping to manage flash / instant notifications / messag...

403,329 518
gbuckingham89/laraflash

A package for handling flash messages / notifications in Laravel.

54,234 0
coderello/laraflash

Advanced flash messages for Laravel.

37,347 157

Version History

Version Released PHP Laravel License
v1.7.0 ^7.4|^8.0|^8.5 ^8.0|^9.0|^10.0|^11.0|^12.0|^13.0 MIT
v1.6.0 ^7.4|^8.0 ^8.0|^9.0|^10.0|^11.0|^12.0 MIT
v1.5.1 ^7.4|^8.0 ^5.1|^6.0|^7.0|^8.0|^9.0|^10.0|^11.0 MIT
v1.5.0 ^7.4|^8.0 ^5.1|^6.0|^7.0|^8.0|^9.0|^10.0|^11.0 MIT
v1.4.1 ^7.4|^8.0 ^5.1|^6.0|^7.0|^8.0|^9.0|^10.0 MIT