定制 caffeinated/flash 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

caffeinated/flash

最新稳定版本:v4.1.0

Composer 安装命令:

composer require caffeinated/flash

包简介

Flash Messages for Laravel

README 文档

README

Source License

Laravel 5 flash messages, based off the Laracasts video tutorial on the same topic: Flexible Flash Messages. Originally developed for FusionCMS, an open source content management system.

Quick Installation

Begin by installing the package through Composer.

composer require caffeinated/flash

Once this operation is complete, simply add both the service provider and facade classes to your project's config/app.php file:

Service Provider

Caffeinated\Flash\FlashServiceProvider::class,

Facade

'Flash' => Caffeinated\Flash\Facades\Flash::class,

And that's it! With your coffee in reach, start flashing out messages!

Usage

Usage is simple. Before redirecting to another page, simply call on Flash to set your desired flash message. There are a number of methods to assign different levels of priority (info, success, warning, and error).

Success

Flash::success('This is a success message.');

Info

Flash::info('This is an info message.');

Warning

Flash::warning('This is a warning message.');

Error

Flash::error('This is an error message.');

Rendering

To render your flash messages in your view, simply include the bundled view partial in your master layout:

@include('flash::message')

Note that the bundled view partial is geared for Bootstrap out of the box.

统计信息

  • 总下载量: 49.24k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 46
  • 点击次数: 0
  • 依赖项目数: 7
  • 推荐数: 0

GitHub 信息

  • Stars: 43
  • Watchers: 3
  • Forks: 14
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-01-19