minhajul/notify
Composer 安装命令:
composer require minhajul/notify
包简介
Flash Notification
README 文档
README
Using Composer
composer require minhajul/notify
Add the service provider to config/app.php
Minhajul\Notify\NotifyServiceProvider::class,
Optionally include the Facade in config/app.php if you'd like.
'Notify' => Minhajul\Notify\Facades\Notify::class,
Usage
Basic
From your application, call the flash method with a message and type.
notify()->flash('Welcome back!', 'success');
Within a view, you can now check if a flash message exists and output it.
@if (notify()->ready()) <div class="alert-box {{ notify()->type() }}"> {{ notify()->message() }} </div> @endif
Then, in your view.
@if (notify()->ready()) <script> swal({ title: "{!! notify()->message() !!}", text: "{!! notify()->option('text') !!}", type: "{{ notify()->type() }}" }); </script> @endif
统计信息
- 总下载量: 137
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2019-10-03