@@ -16,7 +16,7 @@ discard block |
||
16 | 16 | return $this->model->whereUserId($userId)->whereIsRead(false)->orderBy('created_at', 'desc')->take(10)->get(); |
17 | 17 | } |
18 | 18 | |
19 | - public function latestForAdmin(){ |
|
19 | + public function latestForAdmin() { |
|
20 | 20 | return $this->model->whereIsRead(false)->orderBy('created_at', 'desc')->take(10)->get(); |
21 | 21 | } |
22 | 22 | |
@@ -90,6 +90,6 @@ discard block |
||
90 | 90 | */ |
91 | 91 | public function markAllAsReadForUser($userId) |
92 | 92 | { |
93 | - return $this->model->whereUserId($userId)->update(['is_read' => true]); |
|
93 | + return $this->model->whereUserId($userId)->update([ 'is_read' => true ]); |
|
94 | 94 | } |
95 | 95 | } |
@@ -28,9 +28,9 @@ |
||
28 | 28 | { |
29 | 29 | $user = \Sentinel::getUser(); |
30 | 30 | |
31 | - if($user->inRole('employee')) { |
|
31 | + if ($user->inRole('employee')) { |
|
32 | 32 | $notifications = $this->notification->latestForUser($user->id); |
33 | - } else{ |
|
33 | + } else { |
|
34 | 34 | $notifications = $this->notification->latestForAdmin(); |
35 | 35 | } |
36 | 36 |
@@ -30,9 +30,9 @@ discard block |
||
30 | 30 | { |
31 | 31 | $user = \Sentinel::getUser(); |
32 | 32 | |
33 | - if($user->inRole('employee')) { |
|
33 | + if ($user->inRole('employee')) { |
|
34 | 34 | $notifications = $this->notification->allForUser($this->auth->id()); |
35 | - } else{ |
|
35 | + } else { |
|
36 | 36 | $notifications = $this->notification->all(); |
37 | 37 | } |
38 | 38 | |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | $this->notification->destroy($notification); |
51 | 51 | |
52 | 52 | return redirect()->route('admin.notification.notification.index') |
53 | - ->withSuccess(trans('core::core.messages.resource deleted', ['name' => 'Notification'])); |
|
53 | + ->withSuccess(trans('core::core.messages.resource deleted', [ 'name' => 'Notification' ])); |
|
54 | 54 | } |
55 | 55 | |
56 | 56 | public function destroyAll() |