Sun Flash helps you to add flash messages to your Laravel application.
sun/laravel-flash is a Laravel package for sun flash helps you to add flash messages to your laravel application..
It currently has 2 GitHub stars and 1.831 downloads on Packagist (latest version v1.4).
Install it with composer require sun/laravel-flash.
Discover more Laravel packages by sun
or browse all Laravel packages to compare alternatives.
Last updated
Sun Flash message helps you to add flash messages to your Laravel application.
In order to install Sun Flash, just add
"sun/laravel-flash": "1.*"
to your composer.json. Then run composer install or composer update.
Then in your config/app.php add
Sun\Flash\FlashServiceProvider::class,
in the providers array and
'Flash' => Sun\Flash\FlashFacade::class,
to the aliases array.
and also added Sun Flash message view where you want to show flash message.
@include('sun::flash')
php artisan vendor:publish
In the Sun Flash message view I used Bootstrap css framework for flash message styling. You also need to add bootstrap to your project.
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
<script src="http://code.jquery.com/jquery-2.1.4.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
Add this line at the bottom of your page
<script>
$(function () {
$('.flash-modal').modal();
})
</script>
Flash::success('Hello');
Flash::error('Whoops! There were some problems with your input.');
Flash::info('your message');
Flash::warning('your message');
Flash::confirm('Message Title', 'Your Message');
Flash::overlay(
'Message Title',
'Your Message',
true,
'Allow Button Text',
'Allow Button Type',
'Dismiss Button Text',
'Dismiss Button Type
);
Defalut value for --
Submit Button = false
Allow Button Text = Save
Allow Button Type = success
Dismiss Button Text = Close
Dismiss Button Type = default



This package is licensed under the MIT License