@@ -17,7 +17,7 @@ |
||
| 17 | 17 | { |
| 18 | 18 | return datatables($query) |
| 19 | 19 | ->addColumn('action', 'device.action') |
| 20 | - ->blacklist([ 'action']) |
|
| 20 | + ->blacklist([ 'action' ]) |
|
| 21 | 21 | ->setRowClass(function($device) { |
| 22 | 22 | return $device->trashed() ? 'alert-danger' : ""; |
| 23 | 23 | }); |
@@ -24,7 +24,7 @@ |
||
| 24 | 24 | * |
| 25 | 25 | * @var array |
| 26 | 26 | */ |
| 27 | - protected static $ignoreChangedAttributes = ['updated_at']; |
|
| 27 | + protected static $ignoreChangedAttributes = [ 'updated_at' ]; |
|
| 28 | 28 | |
| 29 | 29 | /** |
| 30 | 30 | * The attributes to log in the Activity Log |
@@ -24,7 +24,7 @@ |
||
| 24 | 24 | * |
| 25 | 25 | * @var array |
| 26 | 26 | */ |
| 27 | - protected static $ignoreChangedAttributes = ['updated_at']; |
|
| 27 | + protected static $ignoreChangedAttributes = [ 'updated_at' ]; |
|
| 28 | 28 | |
| 29 | 29 | /** |
| 30 | 30 | * The attributes to log in the Activity Log |
@@ -16,24 +16,24 @@ discard block |
||
| 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 |
||
| 106 | 106 | */ |
| 107 | 107 | protected function filename() |
| 108 | 108 | { |
| 109 | - return 'activitylog_' . time(); |
|
| 109 | + return 'activitylog_'.time(); |
|
| 110 | 110 | } |
| 111 | 111 | } |
@@ -38,7 +38,7 @@ discard block |
||
| 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 |
||
| 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 | } |