承接 michaeljennings/errormanager 相关项目开发

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

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

michaeljennings/errormanager

Composer 安装命令:

composer require michaeljennings/errormanager

包简介

A laravel 4 error manager package

README 文档

README

A wrapper for the laravel 4 message bag to make it simpler to add and retrieve messages, also flashes messages to the session so they can be retrieved on the next request.

Installation

Include the package in your composer.json.

"michaeljennings/errormanager": "dev-master";

Run composer install or composer update to download the dependencies.

Once the package has been downloaded add the validation service provider to the list of service providers in app/config/app.php.

'providers' => array(

'Michaeljennings\ErrorManager\ErrorManagerServiceProvider'

);

Add the Error facade to your aliases array.

'aliases' => array(
  
  'Error' => 'Michaeljennings\ErrorManager\Facades\Error',

);

Usage

To add a message into the message bag use the add method.

Error::add('foo', 'bar');

To check if there are any errors in the current message bag use the hasErrors method.

Error::hasErrors();

To retrieve the errors from the message bag use the errors method.

Errors::errors();

You may also use any of the standard message bag functions.

$errors = Errors::errors();

$errors->has('foo)
$errors->first('bar')

You may also redirect with the errors.

return Redirect::back()->withErrors(Errors::errors());

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: Unknown
  • 更新时间: 2014-12-25