@@ -78,7 +78,7 @@ |
||
| 78 | 78 | public static function storeNewSound($soundData) |
| 79 | 79 | { |
| 80 | 80 | $lastSound = collect(Sound::sortedSounds()->get())->last(); |
| 81 | - $sort_order = ['sort_order' => $lastSound->sort_order + 1]; |
|
| 81 | + $sort_order = [ 'sort_order' => $lastSound->sort_order + 1 ]; |
|
| 82 | 82 | $newSound = Sound::create(array_merge($soundData, $sort_order)); |
| 83 | 83 | |
| 84 | 84 | return $newSound; |
@@ -48,8 +48,8 @@ discard block |
||
| 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 |
||
| 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 |
||
| 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 | |