2017 © Pedro Peláez
 

library outmess

Keep track of outcome messages easily.

image

knifecake/outmess

Keep track of outcome messages easily.

  • Sunday, September 28, 2014
  • by knifecake
  • Repository
  • 1 Watchers
  • 0 Stars
  • 12 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 8 Versions
  • 0 % Grown

The README.md

Laravel Outcome Outmess

This package allows you to add messages depending on the outcome of processes, such as updating a user or deleting a menu item. Then you may retrieve all those messages at once and format them in HTML according to the configuration you have set, which may depend, for instance, on the UI framework you are using., (*1)

Installation

Add the following to your composer.json file:, (*2)

"require": {
  ...
  "knifecake/outmess": "1.*"
},
````

Add the following to your Service Provider array in ```app/config/app.php```:

... 'Knifecake\Outmess\OutmessServiceProvider',, (*3)


And this under the ```aliases``` array:

... 'Outmess' => 'Knifecake\Outmess\Facades\Outmess', ..., (*4)


## Setting up a new style Styles are used to render your messages when you call ```Outmess::render()```. All styles are present in the config file inside the ```styles``` array. Every style consists of one or more message types that correspond to the name of the method you use to add a message. Therefore, to set an error message you may call ```Outmess::error($message)``` and define that message type inside your style using the key ```message```. Here is an example of a style definition:

'styles' => array( 'style-name' => array( 'message-type-1' => ', (*5)

Message format string 1, always containing :message, (*6)

', ... 'message-type-n' => ', (*7)

Message format string n, always containing :message, (*8)

', ), ),, (*9)

```, (*10)

Chosing which style to use

To chose what style you want to use change the 'style' config value to the name of that style you wish to use, as long as it is defined inside the styles array. You may also change the style you are using at runtime by calling Outmess::style('new-style'). Notice the style you set will affect all the messages you have already added if any., (*11)

Outputting the messages

To output your messages using the style you have chosen call Outmess::render(). This method outputs a string of HTML so it may be called on a view, for example atop a page. If you did not add any messages this method won't output anything so no worries if you call it without checking first., (*12)

Contributing and reporting bugs

Want a new feature? Something wrong? Any questions? Head to https://github.com/knifecake/outmess and make a pull request or create a new issue., (*13)

The Versions

28/09 2014

dev-master

9999999-dev

Keep track of outcome messages easily.

  Sources   Download

MIT

The Requires

 

by Elias Hernandis

laravel messages laravel4 views

28/09 2014

1.1

1.1.0.0

Keep track of outcome messages easily.

  Sources   Download

MIT

The Requires

 

by Elias Hernandis

laravel messages laravel4 views

28/09 2014

1.0.4

1.0.4.0

Keep track of outcome messages easily.

  Sources   Download

MIT

The Requires

 

by Elias Hernandis

laravel messages laravel4 views

03/09 2013

1.0.x-dev

1.0.9999999.9999999-dev

Keep track of outcome messages easily.

  Sources   Download

MIT

The Requires

 

by Elias Hernandis

laravel messages laravel4 views

03/09 2013

1.0.3

1.0.3.0

Keep track of outcome messages easily.

  Sources   Download

MIT

The Requires

 

by Elias Hernandis

laravel messages laravel4 views

03/09 2013

1.0.2

1.0.2.0

Keep track of outcome messages easily.

  Sources   Download

MIT

The Requires

 

by Elias Hernandis

laravel messages laravel4 views

03/09 2013

1.0.1

1.0.1.0

Keep track of outcome messages easily.

  Sources   Download

MIT

The Requires

 

by Elias Hernandis

laravel messages laravel4 views

03/09 2013

1.0.0

1.0.0.0

Keep track of outcome messages easily.

  Sources   Download

MIT

The Requires

 

by Elias Hernandis

laravel messages laravel4 views