Completed
Pull Request — master (#15)
by
unknown
18:10
created
Repositories/Eloquent/EloquentNotificationRepository.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -16,7 +16,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 }
Please login to merge, or discard this patch.
Composers/NotificationViewComposer.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -28,9 +28,9 @@
 block discarded – undo
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
                 
Please login to merge, or discard this patch.
Http/Controllers/Admin/NotificationsController.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -30,9 +30,9 @@  discard block
 block discarded – undo
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
 block discarded – undo
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()
Please login to merge, or discard this patch.