2017 © Pedro Peláez
 

library messages

Messages Component for Laravel and Orchestra Platform

image

orchestra/messages

Messages Component for Laravel and Orchestra Platform

  • Saturday, July 28, 2018
  • by crynobone
  • Repository
  • 1 Watchers
  • 3 Stars
  • 39,627 Installations
  • PHP
  • 2 Dependents
  • 2 Suggesters
  • 1 Forks
  • 0 Open issues
  • 23 Versions
  • 5 % Grown

The README.md

Messages Component for Laravel and Orchestra Platform

Messages Component bring a unified notification support for Laravel and Orchestra Platform., (*1)

Build Status Latest Stable Version Total Downloads Latest Unstable Version License Coverage Status, (*2)

Table of Content

Version Compatibility

Laravel Messages
5.5.x 3.5.x
5.6.x 3.6.x
5.7.x 3.7.x
5.8.x 3.8.x
6.x 4.x
7.x 5.x
8.x 6.x

Installation

To install through composer, run the following command from terminal:, (*3)

composer require "orchestra/messages"

Configuration

Add Orchestra\Messages\MessagesServiceProvider service provider in config/app.php., (*4)

'providers' => [

    // ...

    Orchestra\Messages\MessagesServiceProvider::class,
],

Aliases

You might want to add Orchestra\Support\Facades\Messages to class aliases in config/app.php:, (*5)

'aliases' => [

    // ...

    'Messages' => Orchestra\Support\Facades\Messages::class,
],

Usage

Adding a Message

Adding a message is as easy as following:, (*6)

Messages::add('success', 'A successful message');

You can also chain messages:, (*7)

Messages::add('success', 'A successful message')
    ->add('error', 'Some error');

Extending a Message to Current Request

There might be situation where you need to extend a message to the current response instead of the following request. You can do this with:, (*8)

Messages::extend(function ($message) {
    $message->add('info', 'Read-only mode');
});

Displaying the Message in a View

Here's an example how you can display the message:, (*9)

<?php

$message = Messages::copy();

if ($message instanceof Orchestra\Messages\MessageBag) {
    $message->setFormat('

:message
'); foreach (['error', 'info', 'success'] as $key) { if ($message->has($key)) { echo implode('', $message->get($key)); } } }

The Versions

28/07 2018

3.6.x-dev

3.6.9999999.9999999-dev http://orchestraplatform.com/docs/latest/components/messages/

Messages Component for Laravel and Orchestra Platform

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel messages notification orchestral orchestra-platform

28/07 2018

v3.6.1

3.6.1.0 http://orchestraplatform.com/docs/latest/components/messages/

Messages Component for Laravel and Orchestra Platform

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel messages notification orchestral orchestra-platform

25/06 2018

dev-master

9999999-dev http://orchestraplatform.com/docs/latest/components/messages/

Messages Component for Laravel and Orchestra Platform

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel messages notification orchestral orchestra-platform

20/02 2018

v3.6.0

3.6.0.0 http://orchestraplatform.com/docs/latest/components/messages/

Messages Component for Laravel and Orchestra Platform

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel messages notification orchestral orchestra-platform

06/09 2017

3.5.x-dev

3.5.9999999.9999999-dev http://orchestraplatform.com/docs/latest/components/messages/

Messages Component for Laravel and Orchestra Platform

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel messages notification orchestral orchestra-platform

12/08 2017
12/08 2017

3.4.x-dev

3.4.9999999.9999999-dev http://orchestraplatform.com/docs/latest/components/messages/

Messages Component for Laravel and Orchestra Platform

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel messages notification orchestral orchestra-platform

26/01 2017

v3.4.0

3.4.0.0 http://orchestraplatform.com/docs/latest/components/messages/

Messages Component for Laravel and Orchestra Platform

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel messages notification orchestral orchestra-platform

26/01 2017

3.3.x-dev

3.3.9999999.9999999-dev http://orchestraplatform.com/docs/latest/components/messages/

Messages Component for Laravel and Orchestra Platform

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel messages notification orchestral orchestra-platform

11/06 2016

v3.3.0

3.3.0.0 http://orchestraplatform.com/docs/latest/components/messages/

Messages Component for Laravel and Orchestra Platform

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel messages notification orchestral orchestra-platform

10/03 2016

3.2.x-dev

3.2.9999999.9999999-dev http://orchestraplatform.com/docs/latest/components/messages/

Messages Component for Laravel and Orchestra Platform

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel messages notification orchestral orchestra-platform

10/03 2016

v3.2.1

3.2.1.0 http://orchestraplatform.com/docs/latest/components/messages/

Messages Component for Laravel and Orchestra Platform

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel messages notification orchestral orchestra-platform

10/03 2016

3.1.x-dev

3.1.9999999.9999999-dev http://orchestraplatform.com/docs/latest/components/messages/

Messages Component for Laravel and Orchestra Platform

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel messages notification orchestral orchestra-platform

10/03 2016

v3.1.4

3.1.4.0 http://orchestraplatform.com/docs/latest/components/messages/

Messages Component for Laravel and Orchestra Platform

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel messages notification orchestral orchestra-platform

24/11 2015

v3.2.0

3.2.0.0 http://orchestraplatform.com/docs/latest/components/messages/

Messages Component for Laravel and Orchestra Platform

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel messages notification orchestral orchestra-platform

19/11 2015

v3.1.3

3.1.3.0 http://orchestraplatform.com/docs/latest/components/messages/

Messages Component for Laravel and Orchestra Platform

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel messages notification orchestral orchestra-platform

16/06 2015

v3.1.2

3.1.2.0 http://orchestraplatform.com/docs/latest/components/messages/

Messages Component for Laravel and Orchestra Platform

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel messages notification orchestral orchestra-platform

08/06 2015

v3.1.1

3.1.1.0 http://orchestraplatform.com/docs/latest/components/messages/

Messages Component for Laravel and Orchestra Platform

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel messages notification orchestral orchestra-platform

27/05 2015

3.0.x-dev

3.0.9999999.9999999-dev http://orchestraplatform.com/docs/latest/components/messages/

Messages Component for Laravel and Orchestra Platform

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel messages notification orchestral orchestra-platform

17/05 2015

v3.1.0

3.1.0.0 http://orchestraplatform.com/docs/latest/components/messages/

Messages Component for Laravel and Orchestra Platform

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel messages notification orchestral orchestra-platform

28/02 2015

2.2.x-dev

2.2.9999999.9999999-dev http://orchestraplatform.com/docs/latest/components/messages/

Messages Component for Laravel 4 and Orchestra Platform 2

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

The Development Requires

laravel messages notification orchestral orchestra-platform

05/02 2015

v3.0.0

3.0.0.0 http://orchestraplatform.com/docs/latest/components/messages/

Messages Component for Laravel and Orchestra Platform

  Sources   Download

MIT

The Requires

 

The Development Requires

laravel messages notification orchestral orchestra-platform

03/08 2014

v2.2.0

2.2.0.0 http://orchestraplatform.com/docs/latest/components/messages/

Messages Component for Laravel 4 and Orchestra Platform 2

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

The Development Requires

laravel messages notification orchestral orchestra-platform