PHPackages                             bkstar123/flashing - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Mail &amp; Notifications](/categories/mail)
4. /
5. bkstar123/flashing

ActiveLibrary[Mail &amp; Notifications](/categories/mail)

bkstar123/flashing
==================

A lightweight package to send flash messages in Laravel applications. This packages only supports one single flash message at a time, and the flash message is displayed in the format of a toast notification

1.0.2(6y ago)1731MITPHPPHP ^7.1.3

Since Sep 9Pushed 6y ago1 watchersCompare

[ Source](https://github.com/bkstar123/flashing)[ Packagist](https://packagist.org/packages/bkstar123/flashing)[ RSS](/packages/bkstar123-flashing/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependenciesVersions (5)Used By (1)

bkstar123/flashing
==================

[](#bkstar123flashing)

> A lightweight package to send flash messages in Laravel applications. This package only supports one single flash message at a time, and the flash message is displayed in the format of a toast notification

1. Requirements
---------------

[](#1-requirements)

- PHP 7.1.3+
- Laravel 5.5+

2. Installation
---------------

[](#2-installation)

```
composer require bkstar123/flashing

```

After that, you need to publish the package's assets:
`php artisan vendor:publish --provider="Bkstar123\Flashing\FlashingServiceProvider"`

It will copy a blade view element to your application's `resources/views/vendor/bkstar123_flashing/flashing.blade.php`. You are free to customize this view element. Also, it will copy the package's javascript files to your application's`public/js/vendor/bkstar123)handling/*.js`

3. Usage
--------

[](#3-usage)

**a) In view**

In view or master layout, just include the package's view element with `@include('bkstar123_flashing::flashing')`

**b) In controller methods**

Out of the box, the package provides you with the following toolset for flashing a message:

- `Bkstar123\Flashing\Facades\Flashing` Facade. Alternatively, you can use its alias `Flashing`
- `flashing()` helper function

The package supports the following types of flashing messages:

- ***success***
- ***error***
- ***warning***
- ***info*** (default)

**Example**:

```
