sun/laravel-flash
Composer 安装命令:
composer require sun/laravel-flash
包简介
Sun Flash helps you to add flash messages to your Laravel application.
README 文档
README
Sun Flash message helps you to add flash messages to your Laravel application.
Installation Process
In order to install Sun Flash, just add
"sun/laravel-flash": "1.*"
to your composer.json. Then run composer install or composer update.
Then in your config/app.php add
Sun\Flash\FlashServiceProvider::class,
in the providers array and
'Flash' => Sun\Flash\FlashFacade::class,
to the aliases array.
and also added Sun Flash message view where you want to show flash message.
@include('sun::flash')
To Publish Sun Flash View
php artisan vendor:publish
In the Sun Flash message view I used Bootstrap css framework for flash message styling. You also need to add bootstrap to your project.
Bootstrap css, js and jQuery cdn
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css"> <script src="http://code.jquery.com/jquery-2.1.4.min.js"></script> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>
Add this line at the bottom of your page
<script> $(function () { $('.flash-modal').modal(); }) </script>
All Methods
To show success message
Flash::success('Hello');
To show error message
Flash::error('Whoops! There were some problems with your input.');
To show info message
Flash::info('your message');
To show warning message
Flash::warning('your message');
To show confirm message
Flash::confirm('Message Title', 'Your Message');
To show bootstrap modal popup message
Flash::overlay(
'Message Title',
'Your Message',
true,
'Allow Button Text',
'Allow Button Type',
'Dismiss Button Text',
'Dismiss Button Type
);
Defalut value for --
Submit Button = false
Allow Button Text = Save
Allow Button Type = success
Dismiss Button Text = Close
Dismiss Button Type = default
Screenshots
Flash Message Overlay:
Flash Message Success:
Flash Message Error:
License
This package is licensed under the MIT License
sun/laravel-flash 适用场景与选型建议
sun/laravel-flash 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 1.83k 次下载、GitHub Stars 达 2, 最近一次更新时间为 2015 年 07 月 14 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「php」 「bootstrap」 「message」 「flash」 「laravel」 「flash message」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 sun/laravel-flash 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 sun/laravel-flash 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 sun/laravel-flash 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
PHP AMQP Binding Library
Views for the package MedicOneSystems Livewire Datatables with Bootstrap 4
bootstrap select field module implementing http://silviomoreto.github.io/bootstrap-select/
Selectize Theme for Bootstrap 4
Message queue statistics for OroPlatform
Behat extention for RabbitMQ
统计信息
- 总下载量: 1.83k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 28
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2015-07-14


