Easy Flash Notifications with Flashy (Laravel Package)
This tutorial shows you how to integrate Flashy into your Laravel app
Note: You have to install the Flash plugin to view the clip. Some browsers may automatically download the player file if you don't have Flash installed.
You like text ?
First, pull in the package through Composer.
Run composer require mercuryseries/flashy
And then, if using Laravel 5, include the service provider within config/app.php.
'providers' => [
MercurySeries\Flashy\FlashyServiceProvider::class
];
And, for convenience, add a facade alias to this same file at the bottom:
'aliases' => [
'Flashy' => MercurySeries\Flashy\Flashy::class,
];
Usage
Within your controllers, before you perform a redirect...
public function store()
{
Flashy::message('Welcome Aboard!', 'http://your-awesome-link.com');
return Redirect::home();
}
You may also do:
Flashy::info('Message', 'http://your-awesome-link.com')
Flashy::success('Message', 'http://your-awesome-link.com')
Flashy::error('Message', 'http://your-awesome-link.com')
Flashy::warning('Message', 'http://your-awesome-link.com')
Flashy::primary('Message', 'http://your-awesome-link.com')
Flashy::primaryDark('Message', 'http://your-awesome-link.com')
Flashy::muted('Message', 'http://your-awesome-link.com')
Flashy::mutedDark('Message', 'http://your-awesome-link.com')
Again, if using Laravel, this will
Link: