xililo/flash-popup-widget
最新稳定版本:v0.3.1
Composer 安装命令:
composer require xililo/flash-popup-widget
包简介
A widget that displays session flashes and triggers popups
README 文档
README
FlashPopupWidget is a Yii2 widget that displays session flashes as popups based on the flash types.
Installation
Install the widget using Composer:
composer require xililo/flash-popup-widget
Usage
Let's say you have the folowing in the controller:
Yii::$app->session->addFlash('danger', 'Log in to proceed with the operation.');
Import the FlashPopupWidget class at the top of your main layout view or any view file (e.g. in your views/layouts/main.php):
use xililo\Popups\FlashPopupWidget;
Place the widget call in your view file or controller where you want to display the flashes and trigger the popups:
echo FlashPopupWidget::widget();
This will render the FlashPopupWidget popups based on the flash types.
统计信息
- 总下载量: 40
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2023-07-13