2017 © Pedro Peláez
 

library sysfeedback

image

beeblebrox3/sysfeedback

  • Sunday, February 19, 2017
  • by beeblebrox3
  • Repository
  • 1 Watchers
  • 1 Stars
  • 6 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 4 Versions
  • 0 % Grown

The README.md

Sysfeedback

Tool to use with Laravel Framework to facilitate sending messages from controllers to the views., (*1)

Usage

We use the Session component from Laravel to store messages, so works with redirects too., (*2)

Multiple messages from the same type are grouped into one message, separated by <br />., (*3)

We have 4 type of messages:, (*4)

  • Success;
  • Info;
  • Error;
  • Warning.

You specify the type of the message to send by calling a static method named with the type name., (*5)

use Beeblebrox3\Sysfeedback;

Sysfeedback::success('this is a success message!');

sysfeedback::info('this is a information message');

Sysfeedback::error('this is a error message!');

Sysfeedback::warning('this is a warning message!');

To display the messages, use the render method:, (*6)

use Beeblebrox3\Sysfeedback;

Sysfeedback::success('this is a success message!');

Sysfeedback::render();

/*
This method will print something like this:


this is a success message!
*/

You can customize the format of the output passing the new format to the render method., (*7)

use Beeblebrox3\Sysfeedback;

Sysfeedback::success('this is a success message!');

Sysfeedback::render('

:message
'); /* This method will print something like this:
this is a success message!
*/

:message indicates where put the message text., (*8)

:type indicates where put the type of the message, usually to use as a class name to apply stylesheet., (*9)

Changelog

  • 1.2.0: the format now use :type placeholder to put the type of the message instead of :class;
  • 1.1.0: allow curtomize the output format;

The Versions

19/02 2017

dev-master

9999999-dev

  Sources   Download

The Requires

 

10/04 2014

v1.2.0

1.2.0.0

  Sources   Download

The Requires

 

20/03 2014

v1.1.0

1.1.0.0

  Sources   Download

The Requires

  • php >=5.3.0

 

26/12 2013

v1.0.0

1.0.0.0

  Sources   Download

The Requires

  • php >=5.3.0