2017 © Pedro Peláez
 

library errormanager

A laravel 4 error manager package

image

michaeljennings/errormanager

A laravel 4 error manager package

  • Tuesday, March 31, 2015
  • by michaeljennings
  • Repository
  • 1 Watchers
  • 0 Stars
  • 6 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

Error Manager

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., (*1)

Installation

Include the package in your composer.json., (*2)

"michaeljennings/errormanager": "dev-master";, (*3)

Run composer install or composer update to download the dependencies., (*4)

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

'providers' => array(, (*6)

'Michaeljennings\ErrorManager\ErrorManagerServiceProvider'

);, (*7)

Add the Error facade to your aliases array., (*8)

'aliases' => array(

  'Error' => 'Michaeljennings\ErrorManager\Facades\Error',

);

Usage

To add a message into the message bag use the add method., (*9)

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

To check if there are any errors in the current message bag use the hasErrors method., (*10)

Error::hasErrors();

To retrieve the errors from the message bag use the errors method., (*11)

Errors::errors();

You may also use any of the standard message bag functions., (*12)

$errors = Errors::errors();

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

You may also redirect with the errors., (*13)

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

The Versions

31/03 2015

dev-master

9999999-dev

A laravel 4 error manager package

  Sources   Download

The Requires

 

by Michael Jennings