mascame/notify
Composer 安装命令:
composer require mascame/notify
包简介
Notify is a package to rapidly notificate your users about something using Bootstrap classes
README 文档
README
Notify is a package to rapidly notificate your users about something using Bootstrap classes
A nice alternative if this don't satisfy your needs
Installation
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
Usage
- Require bootstrap or compatible framework.
- Edit config file to your needs.
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'); }
License
MIT
统计信息
- 总下载量: 208
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 3
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2014-09-22