laracasts/flash
https://github.com/laracasts/flash
This composer package offers a Twitter Bootstrap optimized flash messaging setup for your Laravel applications.
Begin by pulling in the package through Composer.
composer require laracasts/flash
Next, if using Laravel 5, include the service provider within your config/app.php
file.
'providers' => [
Laracasts\Flash\FlashServiceProvider::class,
];
Finally, as noted above, the default CSS classes for your flash message are optimized for Twitter Bootstrap. As such, pull in the Bootstrap's CSS within your HTML or layout file.
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
Within your controllers, before you perform a redirect, make a call to the flash()
function.
public function store()
{
flash('Welcome Aboard!');
return home();
}