@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | */ |
89 | 89 | protected function registerRoutes() |
90 | 90 | { |
91 | - Route::group($this->routeConfiguration(), function () { |
|
91 | + Route::group($this->routeConfiguration(), function() { |
|
92 | 92 | $this->loadRoutesFrom(__DIR__.'/../../routes/web.php'); |
93 | 93 | }); |
94 | 94 | } |
@@ -102,7 +102,7 @@ discard block |
||
102 | 102 | { |
103 | 103 | return [ |
104 | 104 | 'prefix' => config('announcement.prefix', 'admin'), |
105 | - 'middleware' => config('announcement.middleware', ['web', 'auth']), |
|
105 | + 'middleware' => config('announcement.middleware', [ 'web', 'auth' ]), |
|
106 | 106 | ]; |
107 | 107 | } |
108 | 108 |
@@ -54,7 +54,7 @@ discard block |
||
54 | 54 | ], |
55 | 55 | ], |
56 | 56 | 'children' => array_merge( |
57 | - [[ |
|
57 | + [ [ |
|
58 | 58 | 'type' => 'submenu', |
59 | 59 | 'name' => 'Timeline', |
60 | 60 | 'is_active' => request()->routeIs('timeline') ? 'active' : '', |
@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | 'condition' => auth()->user()->can('view-any', Announcement::class), |
66 | 66 | ], |
67 | 67 | ], |
68 | - ]], |
|
68 | + ] ], |
|
69 | 69 | $this->indexCreateChildren('announcement', Announcement::class) |
70 | 70 | ), |
71 | 71 | ], |
@@ -11,18 +11,18 @@ discard block |
||
11 | 11 | { |
12 | 12 | use LogsActivity; |
13 | 13 | |
14 | - protected $guarded = []; |
|
14 | + protected $guarded = [ ]; |
|
15 | 15 | |
16 | 16 | // Forget cache on updating or saving and deleting |
17 | 17 | public static function boot() |
18 | 18 | { |
19 | 19 | parent::boot(); |
20 | 20 | |
21 | - static::saving(function () { |
|
21 | + static::saving(function() { |
|
22 | 22 | self::cacheKey(); |
23 | 23 | }); |
24 | 24 | |
25 | - static::deleting(function () { |
|
25 | + static::deleting(function() { |
|
26 | 26 | self::cacheKey(); |
27 | 27 | }); |
28 | 28 | } |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | protected static $logName = 'announcement'; |
38 | 38 | |
39 | 39 | // Appends |
40 | - protected $appends = ['audience_names', 'color']; |
|
40 | + protected $appends = [ 'audience_names', 'color' ]; |
|
41 | 41 | |
42 | 42 | // Casts |
43 | 43 | protected $casts = [ |
@@ -59,20 +59,20 @@ discard block |
||
59 | 59 | |
60 | 60 | public function getColorAttribute() |
61 | 61 | { |
62 | - $colors = ['primary', 'secondary', 'success', 'info', 'warning', 'danger', 'pink', 'grey']; |
|
62 | + $colors = [ 'primary', 'secondary', 'success', 'info', 'warning', 'danger', 'pink', 'grey' ]; |
|
63 | 63 | |
64 | - return $colors[array_rand($colors, 1)]; |
|
64 | + return $colors[ array_rand($colors, 1) ]; |
|
65 | 65 | } |
66 | 66 | |
67 | 67 | public function mediums() |
68 | 68 | { |
69 | 69 | if (isset($this->medium)) { |
70 | 70 | foreach ($this->medium as $val) { |
71 | - $mediums[] = [ |
|
71 | + $mediums[ ] = [ |
|
72 | 72 | 1 => 'database', |
73 | 73 | 2 => 'mail', |
74 | 74 | 3 => 'slack', |
75 | - ][$val]; |
|
75 | + ][ $val ]; |
|
76 | 76 | } |
77 | 77 | |
78 | 78 | return $mediums; |