Skip to content

industrious-agency/laravel-flash

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Laravel Flash

Simple laravel flash package used across systems

Install

If you are using Laravel 5.4 or below, you will need to add the Service Provider below in manually to the config/app.php file. Otherwise it will be autoloaded on Laravel 5.5+

Provider:

Industrious\Flash\FlashServiceProvider::class,

Usage

Include in Layouts:

You will need to include the below partials in layouts file, so its available on all views.

@include('industrious-flash::flash-messages')
Controllers:

To use it, simply include FlashesMessages Trait where required.

use Industrious\Flash\Traits\FlashesMessages;

...

use FlashesMessages;

You will then have access to the method and be able to use it as below;

$this->flash('danger', 'Session has expired due to inactivity');
$this->flash('success', 'Successfully updated user details');

The first parameter refers to bootstrap style and the second parameter is the message that will be displayed.

Check out the Bootstrap documentation for all styling possibilities

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published