New

Just launched: Vueblocks, a brand-new search engine for Vue packages! Explore Vueblocks →

caffeinated/flash

Flash Messages for Laravel
51,183 43
Install
composer require caffeinated/flash
Latest Version:v4.1.0
PHP:^7.2|^8.0
Laravel:6 · 7 · 8
Older releases:5
License:MIT
Last Updated:Mar 7, 2023
Links: GitHub  ·  Packagist
Maintainer: thekanbo

Caffeinated Flash Messages

Source License

Laravel 5 flash messages, based off the Laracasts video tutorial on the same topic: Flexible Flash Messages. Originally developed for FusionCMS, an open source content management system.

Quick Installation

Begin by installing the package through Composer.

composer require caffeinated/flash

Once this operation is complete, simply add both the service provider and facade classes to your project's config/app.php file:

Service Provider
Caffeinated\Flash\FlashServiceProvider::class,
Facade
'Flash' => Caffeinated\Flash\Facades\Flash::class,

And that's it! With your coffee in reach, start flashing out messages!

Usage

Usage is simple. Before redirecting to another page, simply call on Flash to set your desired flash message. There are a number of methods to assign different levels of priority (info, success, warning, and error).

Success
Flash::success('This is a success message.');
Info
Flash::info('This is an info message.');
Warning
Flash::warning('This is a warning message.');
Error
Flash::error('This is an error message.');

Rendering

To render your flash messages in your view, simply include the bundled view partial in your master layout:

@include('flash::message')

Note that the bundled view partial is geared for Bootstrap out of the box.

Related Packages

caffeinated/modules

Laravel Modules

678,971 949
tonning/flash

Flash for Laravel

16,814 1
caffeinated/bonsai

Asset management package for the Laravel 5 framework.

14,583 25
pipeosorio1/modules

Laravel Modules

12,677 0
combindma/flash

Easy Flash Messages for a Laravel App

1,194 0

Version History

Version Released PHP Laravel License
v4.1.0 ^7.2|^8.0 ^6.0|^7.0|^8.0 MIT
v4.0.0 ^7.2 ^6.0|^7.0 MIT
v3.1.0 >=7.1.3 5.5.*|5.6.*|5.7.*|5.8.*|^6.0 MIT
v3.0.1 >=5.6.4 5.* MIT
v3.0 >=5.6.4 5.3.* MIT