Package Data | |
---|---|
Maintainer Username: | marcmascarell |
Maintainer Contact: | marcmascarell@gmail.com (Marc Mascarell) |
Package Create Date: | 2014-09-22 |
Package Last Update: | 2017-03-03 |
Language: | PHP |
License: | MIT |
Last Refreshed: | 2024-12-11 15:25:45 |
Package Statistics | |
---|---|
Total Downloads: | 207 |
Monthly Downloads: | 1 |
Daily Downloads: | 0 |
Total Stars: | 1 |
Total Watchers: | 2 |
Total Forks: | 1 |
Total Open Issues: | 0 |
Notify is a package to rapidly notificate your users about something using Bootstrap classes
A nice alternative if this don't satisfy your needs
Require this package in your composer.json and run composer update:
"mascame/notify": "dev-master"
Add to app/config
:
// the Service Provider
'Mascame\Notify\NotifyServiceProvider'
// the alias
'Notify' => '\Mascame\Notify\Notify'
Publish assets and config
php artisan config:publish mascame/notify
In template:
Notify::all();
// blade
{{ Notify::all(); }}
In your logic:
// $autohide = false, $icon = null, $dismissable = false
Notify::success('Successfuly notified!');
Notify::danger('Real danger!');
Notify::info('Informed!');
Notify::warning('Warning!');
Notify::loading('Loading...');
Notify::add($value, $type = 'success', $autohide = false, $icon = null, $dismissable = false);
A real world example:
// this will autohide and get the default values for icon and dismissable
public function logout()
{
Auth::logout();
Notify::success('Successfuly logged out!', true);
return Redirect::to('home');
}
MIT