gupalo/browser-notifier
最新稳定版本:1.3.2
Composer 安装命令:
composer require gupalo/browser-notifier
包简介
Extension of Symfony Notifier for browsers
README 文档
README
Simple use of Symfony Notifier.
Install
Composer
composer require gupalo/browser-notifier
Create config/packages/browser_notifier.yaml
imports:
- {resource: '../../vendor/gupalo/browser-notifier/config/services.yaml'}
Usage
Controller
public function ...(..., BrowserNotifier $notifier): Response
{
...
$notifier->send('Something');
$notifier->success('Something');
$notifier->warning('Something');
$notifier->error('Something');
...
}
Twig
{{ app.request.hasPreviousSession ? app.flashes('info')|browser_notifications|raw : '' }}
Use BrowserLogger as logger implementing LoggerInterface.
统计信息
- 总下载量: 21.68k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 3
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2020-05-25