Completed
Pull Request — master (#78)
by Brandon
02:00
created
app/DataTables/ActivityLogDataTable.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -16,24 +16,24 @@  discard block
 block discarded – undo
16 16
     public function dataTable($query)
17 17
     {
18 18
         return datatables($query)
19
-            ->editColumn('causer_id', function ($activity) {
19
+            ->editColumn('causer_id', function($activity) {
20 20
                 if ($activity->causer_id) {
21
-                    return '<a href="/' . ($activity->causer_type == "App\User" ? 'user' : 'device') . '/' . $activity->causer_id . '">' . $activity->causer->name . '</a>';
21
+                    return '<a href="/'.($activity->causer_type == "App\User" ? 'user' : 'device').'/'.$activity->causer_id.'">'.$activity->causer->name.'</a>';
22 22
                 } else {
23 23
                     return 'Application';
24 24
                 }
25 25
             })
26
-            ->editColumn('subject_id', function ($activity) {
26
+            ->editColumn('subject_id', function($activity) {
27 27
                 if ($activity->subject_id) {
28
-                    return '<a href="/' . ($activity->subject_type == "App\User" ? 'user' : 'device') . '/' . $activity->subject_id . '">' . $activity->subject->name . '</a>';
28
+                    return '<a href="/'.($activity->subject_type == "App\User" ? 'user' : 'device').'/'.$activity->subject_id.'">'.$activity->subject->name.'</a>';
29 29
                 } else {
30 30
                     return 'None';
31 31
                 }
32 32
             })
33
-            ->editColumn('properties', function ($activity) {
33
+            ->editColumn('properties', function($activity) {
34 34
                 return $activity->properties;
35 35
             })
36
-            ->rawColumns(['causer_id', 'subject_id', 'properties']);
36
+            ->rawColumns([ 'causer_id', 'subject_id', 'properties' ]);
37 37
     }
38 38
 
39 39
     /**
@@ -106,6 +106,6 @@  discard block
 block discarded – undo
106 106
      */
107 107
     protected function filename()
108 108
     {
109
-        return 'activitylog_' . time();
109
+        return 'activitylog_'.time();
110 110
     }
111 111
 }
Please login to merge, or discard this patch.
app/User.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@  discard block
 block discarded – undo
38 38
      *
39 39
      * @var array
40 40
      */
41
-    protected static $ignoreChangedAttributes = ['updated_at'];
41
+    protected static $ignoreChangedAttributes = [ 'updated_at' ];
42 42
     
43 43
     /**
44 44
      * The attributes to log in the Activity Log
@@ -141,6 +141,6 @@  discard block
 block discarded – undo
141 141
     public function roleString()
142 142
     {
143 143
         $role_en = array(0 => "Registered", 1 => "User", 2 => "Manager", 3 => "Admin");
144
-        return $role_en[ $this->role ] . ' (' . $this->role . ')';
144
+        return $role_en[ $this->role ].' ('.$this->role.')';
145 145
     }
146 146
 }
Please login to merge, or discard this patch.