@@ -1,11 +1,11 @@ |
||
1 | 1 | <?php |
2 | 2 | if (!function_exists('laraflash')) { |
3 | 3 | //默认是info类型 |
4 | - function laraflash($message = '',$type = "info") |
|
4 | + function laraflash($message = '', $type = "info") |
|
5 | 5 | { |
6 | 6 | $notify = app('laraflash'); |
7 | 7 | if (!is_null($message)) { |
8 | - return $notify->message($message,$type); |
|
8 | + return $notify->message($message, $type); |
|
9 | 9 | } |
10 | 10 | return $notify; |
11 | 11 | } |
@@ -13,7 +13,7 @@ discard block |
||
13 | 13 | */ |
14 | 14 | public function boot() |
15 | 15 | { |
16 | - $this->loadViewsFrom(__DIR__.'/../../views','laraflash'); |
|
16 | + $this->loadViewsFrom(__DIR__.'/../../views', 'laraflash'); |
|
17 | 17 | |
18 | 18 | $this->publishes([ |
19 | 19 | __DIR__.'/../../views'=>base_path('resources/views/vendor/laraFlash'), |
@@ -32,7 +32,7 @@ discard block |
||
32 | 32 | 'GeekGhc\LaraFlash\LaravelSessionStore' |
33 | 33 | ); |
34 | 34 | |
35 | - $this->app->singleton('laraflash',function(){ |
|
35 | + $this->app->singleton('laraflash', function() { |
|
36 | 36 | return $this->app->make('GeekGhc\LaraFlash\FlashNotifier'); |
37 | 37 | }); |
38 | 38 | } |
@@ -12,21 +12,21 @@ discard block |
||
12 | 12 | |
13 | 13 | public function success($message) |
14 | 14 | { |
15 | - return $this->message($message,'success'); |
|
15 | + return $this->message($message, 'success'); |
|
16 | 16 | } |
17 | 17 | |
18 | 18 | public function error($message) |
19 | 19 | { |
20 | - return $this->message($message,'error'); |
|
20 | + return $this->message($message, 'error'); |
|
21 | 21 | } |
22 | 22 | |
23 | 23 | public function warning($message) |
24 | 24 | { |
25 | - return $this->message($message,'warning'); |
|
25 | + return $this->message($message, 'warning'); |
|
26 | 26 | } |
27 | 27 | |
28 | - public function info($message){ |
|
29 | - return $this->message($message,'info'); |
|
28 | + public function info($message) { |
|
29 | + return $this->message($message, 'info'); |
|
30 | 30 | } |
31 | 31 | |
32 | 32 | public function modal($message, $title = 'Message', $type = 'info') |
@@ -37,10 +37,10 @@ discard block |
||
37 | 37 | return $this; |
38 | 38 | } |
39 | 39 | |
40 | - public function message($message,$type = 'info') |
|
40 | + public function message($message, $type = 'info') |
|
41 | 41 | { |
42 | - $this->session->flash('flash_notification.message',$message); |
|
43 | - $this->session->flash('flash_notification.type',$type); |
|
42 | + $this->session->flash('flash_notification.message', $message); |
|
43 | + $this->session->flash('flash_notification.type', $type); |
|
44 | 44 | return $this; |
45 | 45 | } |
46 | 46 |
@@ -25,8 +25,8 @@ |
||
25 | 25 | * @param string $name |
26 | 26 | * @param array $data |
27 | 27 | */ |
28 | - public function flash($name,$data) |
|
28 | + public function flash($name, $data) |
|
29 | 29 | { |
30 | - $this->session->flash($name,$data); |
|
30 | + $this->session->flash($name, $data); |
|
31 | 31 | } |
32 | 32 | } |
33 | 33 | \ No newline at end of file |