| Package Data | |
|---|---|
| Maintainer Username: | JellyBean |
| Maintainer Contact: | ghcgavin@sina.com (GeekGhc) |
| Package Create Date: | 2017-04-12 |
| Package Last Update: | 2017-04-14 |
| Home Page: | |
| Language: | HTML |
| License: | MIT |
| Last Refreshed: | 2025-12-16 15:01:17 |
| Package Statistics | |
|---|---|
| Total Downloads: | 73 |
| Monthly Downloads: | 0 |
| Daily Downloads: | 0 |
| Total Stars: | 8 |
| Total Watchers: | 1 |
| Total Forks: | 4 |
| Total Open Issues: | 0 |

composer安装composer require geekghc/flash
或者在你的composer.json里require部分添加
"geekghc/flash":"~2.0"
config/app.php添加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视图@include('laraflash::notification')
或者
@include('laraflash::header-notification')
laraflash()这样的helper functioninfo
在此之前使用CDN的形式引入jquery和font-awesome
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Laravel</title>
<link href="//cdn.bootcss.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet">
</head>
<body>
<script src="//cdn.bootcss.com/jquery/2.1.0/jquery.min.js"></script>
@include('laraflash::notification')
</body>
</html>
php artisan vendor:publish
resources/views/vendor/laraFlash目录下