ryan/toastr-for-laravel
最新稳定版本:1.1.0
Composer 安装命令:
composer require ryan/toastr-for-laravel
包简介
toastr.js for laravel5
README 文档
README
Installation
-
Run
composer require ryan/toastr-for-laravel -
Add
Yuansir\Toastr\ToastrServiceProvider::class,to providers in config/app.php -
Add
'Toastr' => Yuansir\Toastr\Facades\Toastr::class,to aliases in config/app.php -
Run
php artisan vendor:publish
Usage
Just add this code to your blade template file:
{!! Toastr::render() !!}
Use these methods in controllers:
Toastr::warning($message, $title = null, $options = [])Toastr::error($message, $title = null, $options = [])Toastr::info($message, $title = null, $options = [])Toastr::success($message, $title = null, $options = [])Toastr::clear()
Config
set the toaster options in config/toastr.php , available options => toastr.js demo
统计信息
- 总下载量: 9.14k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 40
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: Unknown
- 更新时间: 2016-01-22