This package is abandoned and no longer maintained. No replacement package was suggested.

Laravel package to flash error msg inspired by laracast/flash.

1.0.0 2018-04-09 05:58 UTC

This package is not auto-updated.

Last update: 2020-01-28 06:06:03 UTC


README

Inspired by laracast alert package

Easy Flash Messages for Your Laravel App (Dont use for production application.)

This composer package offers a Twitter Bootstrap 4 optimized flash messaging setup for your Laravel 5 applications.

Installation

Begin by pulling in the package through Composer.

composer require bindeveloperz/alert

Next, if using Laravel 5.5, include the service provider within your config/app.php file.

'providers' => [
    Bindeveloperz\Alert\AlertServiceProvider::class,
];

Usage

Within your controllers, before you perform a redirect, make a call to the flash() function.

public function store()
{
    flash('Welcome Aboard!');

    return home();
}

You may also do:

  • flash('Message')->success(): Set the flash theme to "success".
  • flash('Message')->error(): Set the flash theme to "danger".
  • flash('Message')->warning(): Set the flash theme to "warning".

With this message flashed to the session, you may now display it in your view(s). Because flash messages and overlays are so common, we provide a template out of the box to get you started. You're free to use - and even modify to your needs - this template how you see fit.

@include('flash::message')