sh/flash
最新稳定版本:v1.0
Composer 安装命令:
composer require sh/flash
包简介
Plugin to display flash messages.
关键字:
README 文档
README
FlashMessage
This module is used to display flash messages in your project.
To use this module the following code needs be added in the frotcontroller.
$di->setShared('flash', function() { $flash = new \Anax\FlashMessage\FlashMessage(); return $flash; });
If you want to keep the code consistent it also can be added in the CDIFactoryDefault that is located in src/DI. It should be added like this.
$this->setShared('flash', function() { $flash = new \Anax\FlashMessage\FlashMessage(); return $flash; });
To use the the flash messages add the following line to your project.
$app->flash->message('information', 'This is a info message'); $app->flash->message('warning', 'This is a warning message'); $app->flash->message('success', 'This is a success message'); $app->flash->message('error', 'This is a error message');
This will generate HTML-code that will be displayed in the view.
The style of the flash messages can be changed in the flash.css file.
统计信息
- 总下载量: 13
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2015-04-09