manuelgeek/laravel-btoast
Composer 安装命令:
composer require manuelgeek/laravel-btoast
包简介
A bootstrap 4 toast wrapper for Laravel
README 文档
README
This is where your description should go. Take a look at contributing.md to see a to do list.

Installation
1. Via Composer
composer require manuelgeek/laravel-btoast
2. Optional, below Laravel 5.5: Add 'Manuelgeek\LaravelBtoast\BToastServiceProvider' to providers in config/app.php, and add 'BToast' => 'Manuelgeek\LaravelBtoast\Facades\BToast' to aliases in config/app.php.
// config/app.php 'providers' => array( // ... 'Manuelgeek\LaravelBtoast\BToastServiceProvider', ), // ... 'aliases' => array( // ... 'BToast' => 'Manuelgeek\LaravelBtoast\Facades\BToast', ),
3. Include @include('btoast::messages')in your layout template.
4. Optional: Run php artisan vendor:publish --provider="Manuelgeek\LaravelBtoast\BToastServiceProvider" --tag="config" to publish the config file.
5. Optional: Modify the published configuration file located at config/laravel-btoast.php to your preference.
6. Optional: Run php artisan vendor:publish --provider="Manuelgeek\LaravelBtoast\BToastServiceProvider" --tag="views" to publish the views.
7. Optional: Modify the published views located at resources/views/vendor/btoast to your preference.
Configuration
Open config/laravel-btoast.php to adjust package configuration. If this file doesn't exist, run php artisan vendor:publish --provider="Manuelgeek\LaravelBtoast\BToastServiceProvider" --tag="config" to create the default configuration file.
return [ 'animation' => false, 'autohide' => true, 'delay' => 4000, 'position' => 'top-right', // top-left, bottom-right, bottom-left, center,bottom-center, top-center ];
Usage
Use the BToast facade (BToast::) or the helper function (btoast()->) to access the methods in this package. You can also chain multiple messages together using method chaining: btoast()->success('test')->info('user'). The title and subtitle arguments is optional.
Message
BToast::message('message', 'level', 'title'); toast()->message('message', 'level', 'title'); toast('message', 'title');
Add a toast to the session. Using btoast('message') will use the default level.
Levels include info, success, error, warning, dark, light, secondary
Info
BToast::info('message', 'title', 'subtitle'); btoast()->info('message', 'title', 'subtitle');
Success
BToast::success('message', 'title', 'subtitle'); btoast()->success('message', 'title', 'subtitle');
Error
BToast::error('message', 'title', 'subtitle'); btoast()->error('message', 'title', 'subtitle');
Warning
BToast::warning('message', 'title', 'subtitle'); btoast()->warning('message', 'title', 'subtitle');
Light
BToast::light('message', 'title', 'subtitle'); btoast()->light('message', 'title', 'subtitle');
Dark
BToast::dark('message', 'title', 'subtitle'); btoast()->dark('message', 'title', 'subtitle');
Secondary
BToast::secondary('message', 'title', 'subtitle'); btoast()->secondary('message', 'title', 'subtitle');
Clear
BToast::clear(); btoast()->clear();
Change log
Please see the changelog for more information on what has changed recently.
Contributing
Please see contributing.md for details and a todolist.
Security
If you discover any security related issues, please email emashmagak@appslab.co.ke instead of using the issue tracker.
Credits
License
MIT. Please see the license file for more information.
manuelgeek/laravel-btoast 适用场景与选型建议
manuelgeek/laravel-btoast 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 38 次下载、GitHub Stars 达 2, 最近一次更新时间为 2019 年 08 月 30 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「bootstrap」 「notification」 「laravel」 「toast」 「laravel-btoast」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 manuelgeek/laravel-btoast 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 manuelgeek/laravel-btoast 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 manuelgeek/laravel-btoast 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
This package makes it easy to send notifications via AfricasTalking with Laravel
Apple Push Notification & Feedback Provider
Throttle notifications on a per-channel basis
Views for the package MedicOneSystems Livewire Datatables with Bootstrap 4
Extensible library for building notifications and sending them via different delivery channels.
bootstrap select field module implementing http://silviomoreto.github.io/bootstrap-select/
统计信息
- 总下载量: 38
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 9
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2019-08-30