承接 kevinkaske/flash 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

kevinkaske/flash

Composer 安装命令:

composer require kevinkaske/flash

包简介

A simple library to give you flash message support via the $_SESSION superglobal array

README 文档

README

Flash is a Rails-like flash library written in PHP.

##Installation (Composer) Simply add the following to composer.json

{
	"require": {
		"kevinkaske/flash": "dev-master"
	}
}

Then run composer install. Composer will install the dependant libraries.

##Uasge After some action is done call code similar to the following:

<? flash('notice', 'User has been added.'); ?>

This code is setting a flash message to be called on the next page and putting it in the "notice" category.

On the next page (usually this goes in a layout page) use some code like the following:

<? if(isFlashMessage()){ ?>
  <div class="alert-message success">
    <p><?= getFlash('notice'); ?></p>
  </div>
<? } ?>

You can (of course) change this anyway you see fit

统计信息

  • 总下载量: 243
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 2
  • 点击次数: 0
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

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