profiwebman/yii2-bootstrap5-notify
Composer 安装命令:
composer require profiwebman/yii2-bootstrap5-notify
包简介
Alert widget based on Bootstrap Notify extension {@link http://bootstrap-notify.remabledesigns.com/) forked from yii2mod/yii2-bootstrap-notify and modified for use with bootstrap5
README 文档
README
Yii2 Notify Widget
Notify widget based on Bootstrap Notify
Installation
The preferred way to install this extension is through composer.
Either run
php composer.phar require --prefer-dist profiwebman/yii2-bootstrap5-notify "*"
or add
"profiwebman/yii2-bootstrap5-notify": "*"
to the require section of your composer.json.
Usage
Alert widget renders a message from session flash. All flash messages are displayed in the sequence they were assigned using setFlash. You can set message as following:
- Set the message in your action, for example:
Yii::$app->session->setFlash('success', 'This is the message'); Yii::$app->session->setFlash('info', 'Your message'); Yii::$app->session->setFlash('warning', 'Your message'); Yii::$app->session->setFlash('error', 'Your message');
Also, you can set multiple messages as follows:
Yii::$app->session->setFlash('error', ['Error 1', 'Error 2']);
- Simply add widget to your layout as follows:
<?php echo \yii2mod\notify\BootstrapNotify::widget(); ?>
You can render your own message without the session flash as following:
<?php echo \yii2mod\notify\BootstrapNotify::widget([ 'useSessionFlash' => false, 'options' => [ 'message' => 'Your message', ], 'clientOptions' => [ 'type' => \yii2mod\notify\BootstrapNotify::TYPE_SUCCESS, 'showProgressbar' => true ] ]); ?>
Alert Options
You can find them on the options page
Support us
Does your business depend on our contributions? Reach out and support us on Patreon. All pledges will be dedicated to allocating workforce on maintenance and new awesome stuff.
profiwebman/yii2-bootstrap5-notify 适用场景与选型建议
profiwebman/yii2-bootstrap5-notify 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 4 次下载、GitHub Stars 达 0, 最近一次更新时间为 2024 年 11 月 30 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「yii2」 「yii2 alert」 「yii2 bootstrap5 alert」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 profiwebman/yii2-bootstrap5-notify 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 profiwebman/yii2-bootstrap5-notify 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 profiwebman/yii2-bootstrap5-notify 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
A custom URL rule class for Yii 2 which allows to create translated URL rules
A clean and modern Bootstrap-based template for phpDocumentor, focused on improved readability, navigation, and developer experience.
Extension to asset MDBootstrap Free with Bootstrap in Yii2 Projects
The SearchPanes extension for DataTables provides improved Searching functionality allowing users to select options from a Pane which will then in turn search the DataTable and return the relevant results. There are multiple configuration options available to enhance SearchPanes. This is SearchPanes
Symfony 8 bundle providing a full-featured CMS admin panel — trait-based CRUD operations, DTO↔entity sync, CSV export, sortable lists, soft delete, copy/move, toggle, and Bootstrap 5 admin UI
Blade components to rapidly build forms with Tailwind CSS Custom Forms and Bootstrap 4.
统计信息
- 总下载量: 4
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 15
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2024-11-30