PHPackages                             geekghc/flash - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. geekghc/flash

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

geekghc/flash
=============

flash for laravel

2.8(9y ago)8734MITHTMLPHP &gt;=5.5.9

Since Apr 12Pushed 9y ago1 watchersCompare

[ Source](https://github.com/GeekGhc/LaraFlash)[ Packagist](https://packagist.org/packages/geekghc/flash)[ RSS](/packages/geekghc-flash/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (3)Versions (7)Used By (0)

Flash Message For Laravel5
==========================

[](#flash-message-for-laravel5)

[![Build Status](https://camo.githubusercontent.com/f7614d98a2bee30d03f1fd395ea50c00ac7a87c4504121925760ac9332fc7f94/68747470733a2f2f7472617669732d63692e6f72672f4765656b4768632f4c617261466c6173682e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/GeekGhc/LaraFlash)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/b35684c2b3a02cbde75416fcb950317f42f07b5cd90e26b027c449d1364ee9e1/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f4765656b4768632f4c617261466c6173682f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/GeekGhc/LaraFlash/?branch=master)

介绍
--

[](#介绍)

> 基于 [Jeffery Way's Flash Package](https://github.com/laracasts/flash)

预览
--

[](#预览)

[![1.gif](screenshot/1.gif)](screenshot/1.gif)[![2.gif](screenshot/2.gif)](screenshot/2.gif)

安装
--

[](#安装)

#### 使用`composer`安装

[](#使用composer安装)

```
composer require geekghc/flash

```

或者在你的`composer.json`里`require`部分添加

```
"geekghc/flash":"~2.0"
```

#### 下载完毕之后在`config/app.php`添加`service provider`

[](#下载完毕之后在configappphp添加service-provider)

```
'providers' => [
    GeekGhc\LaraFlash\FlashProvider::class,
];
```

为了方便使用 可以再去添加一个`alias`

```
'aliases' => [
    'LaraFlash'=>GeekGhc\LaraFlash\Flash::class,
];
```

用法
--

[](#用法)

### 在你的控制器里 重定向之前

[](#在你的控制器里-重定向之前)

```
public function store()
{
    LaraFlash::success("Welcome Aboard!");

    return Redirect::home();
}
```

#### 在你的视图中添加`notification`视图

[](#在你的视图中添加notification视图)

```
@include('laraflash::notification')
```

或者

```
@include('laraflash::header-notification')
```

#### 你也可以按需求使用下面这种形式

[](#你也可以按需求使用下面这种形式)

- LaraFlash::success('Message')
- LaraFlash::info('Message')
- LaraFlash::error('Message')
- LaraFlash::warning('Message')

#### 当然你可也以使用`laraflash()`这样的`helper function`

[](#当然你可也以使用laraflash这样的helper-function)

- laraflash('Message!') 默认为`info`
- laraflash()-&gt;success('Message!')
- laraflash()-&gt;info('Message!')
- laraflash()-&gt;error('Message!')
- laraflash()-&gt;warning('Message!')

例子
--

[](#例子)

在此之前使用`CDN`的形式引入`jquery`和`font-awesome`

```
>

    Laravel

@include('laraflash::notification')

```

自定义样式
-----

[](#自定义样式)

#### 你可以修改样式以达到你的需求

[](#你可以修改样式以达到你的需求)

```
php artisan vendor:publish

```

#### 这样一来视图文件会放在你的`resources/views/vendor/laraFlash`目录下

[](#这样一来视图文件会放在你的resourcesviewsvendorlaraflash目录下)

###  Health Score

30

—

LowBetter than 62% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity62

Established project with proven stability

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

6

Last Release

3366d ago

Major Versions

1.0 → 2.02017-04-12

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/10245176?v=4)[JellyBean](/maintainers/JellyBean)[@jellybean](https://github.com/jellybean)

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/geekghc-flash/health.svg)

```
[![Health](https://phpackages.com/badges/geekghc-flash/health.svg)](https://phpackages.com/packages/geekghc-flash)
```

###  Alternatives

[oat-sa/tao-core

TAO core extension

66143.7k120](/packages/oat-sa-tao-core)[typo3/cms-redirects

TYPO3 CMS Redirects - Create manual redirects, list existing redirects and automatically createredirects on slug changes.

167.4M78](/packages/typo3-cms-redirects)[rias/statamic-redirect

29335.6k](/packages/rias-statamic-redirect)[codefog/contao-news_categories

News Categories bundle for Contao Open Source CMS

3189.0k6](/packages/codefog-contao-news-categories)[terminal42/contao-node

Node bundle for Contao Open Source CMS

3177.0k6](/packages/terminal42-contao-node)[ronasit/laravel-helpers

Provided helpers function and some helper class.

2085.6k30](/packages/ronasit-laravel-helpers)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
