whagency/yii2-html5-notifications
Composer 安装命令:
composer require whagency/yii2-html5-notifications
包简介
Yii2 html5 web notifications
README 文档
README
Yii2 extension for converting yii2 flash message to html5 web notifications
Installation
The preferred way to install this extension is through composer.
Either run
php composer.phar require "whagency/yii2-html5-notifications" "*"
or add to your composer.json file
"require": { "whagency/yii2-html5-notifications": "*" },
Usage Example
- Add widget to your page before
</body>tag
... <?= \webheads\notifications\Alert::widget(['options' => [ 'logo' => 'https://github.com/whagency/yii2-html5-notifications/blob/master/demo/icon.png', 'hideAfter' => 5000, ]]) ?> </body> </html>
- Set yii2 flash message
Yii::$app->session->setFlash('success', 'My notification message');
- Allow html5 messages in your browser
- Result
统计信息
- 总下载量: 92
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2018-06-25

