Completed
Push — master ( b5d17f...c9efec )
by Jeremy
32:20 queued 25:57
created
app/Http/Controllers/Api/ApiSoundsController.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -48,8 +48,8 @@  discard block
 block discarded – undo
48 48
         foreach ($sounds as $sound) {
49 49
             $id = $sound->id;
50 50
             foreach ($request->sounds as $soundsNew) {
51
-                if ($soundsNew['id'] == $id) {
52
-                    $sound->update(['sort_order' => $soundsNew['sort_order']]);
51
+                if ($soundsNew[ 'id' ] == $id) {
52
+                    $sound->update([ 'sort_order' => $soundsNew[ 'sort_order' ] ]);
53 53
                 }
54 54
             }
55 55
         }
@@ -76,12 +76,12 @@  discard block
 block discarded – undo
76 76
         $this->validate($request, [
77 77
             'sound.enabled' => 'required|boolean',
78 78
         ]);
79
-        $sound = SoundServices::updateSoundStatus($id, $request->sound['enabled']);
79
+        $sound = SoundServices::updateSoundStatus($id, $request->sound[ 'enabled' ]);
80 80
         $status = 'disabled';
81 81
         if ($sound->enabled) {
82 82
             $status = 'enabled';
83 83
         }
84
-        $message = trans('admin.messages.status-updated', ['status' => $status, 'title' => $sound->title]);
84
+        $message = trans('admin.messages.status-updated', [ 'status' => $status, 'title' => $sound->title ]);
85 85
 
86 86
         ActivityLogger::activity($message);
87 87
 
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
         ActivityLogger::activity('Sounds deleted: '.$sound);
108 108
 
109 109
         return response()->json([
110
-            'message' => trans('admin.messages.sound-deleted', ['title' => $sound->title]),
110
+            'message' => trans('admin.messages.sound-deleted', [ 'title' => $sound->title ]),
111 111
         ], 200);
112 112
     }
113 113
 
Please login to merge, or discard this patch.