2017 © Pedro Peláez
 

library flash

Package to simply and beautify Flash messages in Laravel 5

image

kagga/flash

Package to simply and beautify Flash messages in Laravel 5

  • Tuesday, February 16, 2016
  • by Kagga
  • Repository
  • 1 Watchers
  • 0 Stars
  • 46 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 9 Versions
  • 0 % Grown

The README.md

Simple Flash Messages

Lets get started

Installation

Install this package through composer, (*1)

Simply run composer require kagga/flash, (*2)

If using Laravel 5 add the service provider in config/app.php., (*3)

'providers' => [
    Kagga\Flash\FlashServiceProvider::class
];

For convenience, add a facade alias to this same file at the bottom:, (*4)

'aliases' => [
    'Flash' => Kagga\Flash\Facade\Flash::class
];

Usage

Within your controllers, before the redirect, (*5)

public function update()
{
    Flash::success('Update','Successfully Updated');

    return Redirect::home();
}

You may also do:, (*6)

  • Flash::info('Title','Message')
  • Flash::success('Title','Message')
  • Flash::error('Title','Message')
  • Flash::warning('Title','Message')
  • Flash::overlay('Title',' Message', 'Level') By default the level is success you can override if you specify a level.

This package will set a few keys in the session., (*7)

  • 'message' - The session key.
  • 'message_overlay' - The session key for an overlay.

Alternatively, if you're using Laravel, you may reference the flash() helper function, instead of the facade. Here's an example:, (*8)

public function store()
{

    flash()->success('Title','Message');

    return Redirect::home();
}

This package makes use of sweetalert http://t4t5.github.io/sweetalert/, (*9)

Add the Javascript and css files from http://t4t5.github.io/sweetalert/ to your views, (*10)

To add the Flash view to your view just include it has shown below., (*11)

@include('flash::flash')

If you need to modify the flash message partial, you can run:, (*12)

php artisan vendor:publish

The package view will now be located in the \resources\views\vendor\flash directory., (*13)

The Versions

16/02 2016

dev-master

9999999-dev

Package to simply and beautify Flash messages in Laravel 5

  Sources   Download

MIT

The Requires

 

by Avatar Kagga

laravel flash messages

16/02 2016

1.0

1.0.0.0

Package to simply and beautify Flash messages in Laravel 5

  Sources   Download

MIT

The Requires

 

by Avatar Kagga

laravel flash messages

16/02 2016

v0.8

0.8.0.0

  Sources   Download

The Requires

 

by Avatar Kagga

16/02 2016

V0.6

0.6.0.0

  Sources   Download

The Requires

 

by Avatar Kagga

16/02 2016

v0.7

0.7.0.0

  Sources   Download

The Requires

 

by Avatar Kagga

16/02 2016

v0.5

0.5.0.0

  Sources   Download

The Requires

 

by Avatar Kagga

16/02 2016

v0.4

0.4.0.0

  Sources   Download

The Requires

 

by Avatar Kagga

16/02 2016

V0.3

0.3.0.0

  Sources   Download

The Requires

 

by Avatar Kagga

16/02 2016

0.1

0.1.0.0

  Sources   Download

The Requires

 

by Avatar Kagga