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-04-27 15:01:59 |
Package Statistics | |
---|---|
Total Downloads: | 71 |
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 function
info
在此之前使用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
目录下