@@ -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; |
@@ -46,7 +46,7 @@ discard block |
||
46 | 46 | { |
47 | 47 | $sound = SoundServices::getBlankSound(); |
48 | 48 | |
49 | - return view('pages.sounds.create', ['sound' => $sound]); |
|
49 | + return view('pages.sounds.create', [ 'sound' => $sound ]); |
|
50 | 50 | } |
51 | 51 | |
52 | 52 | /** |
@@ -77,7 +77,7 @@ discard block |
||
77 | 77 | { |
78 | 78 | $sound = SoundServices::getSound($id); |
79 | 79 | |
80 | - return view('pages.sounds.show', ['sound' => $sound]); |
|
80 | + return view('pages.sounds.show', [ 'sound' => $sound ]); |
|
81 | 81 | } |
82 | 82 | |
83 | 83 | /** |
@@ -91,7 +91,7 @@ discard block |
||
91 | 91 | { |
92 | 92 | $sound = SoundServices::getSound($id); |
93 | 93 | |
94 | - return view('pages.sounds.edit', ['sound' => $sound]); |
|
94 | + return view('pages.sounds.edit', [ 'sound' => $sound ]); |
|
95 | 95 | } |
96 | 96 | |
97 | 97 | /** |
@@ -26,7 +26,7 @@ |
||
26 | 26 | public static function checkIsUserAdminOrHigher($userId) |
27 | 27 | { |
28 | 28 | $user = self::getUser($userId); |
29 | - if (!$user->hasRole(['admin', 'super.admin'])) { |
|
29 | + if (!$user->hasRole([ 'admin', 'super.admin' ])) { |
|
30 | 30 | abort(401); |
31 | 31 | } |
32 | 32 | } |
@@ -47,8 +47,8 @@ discard block |
||
47 | 47 | foreach ($sounds as $sound) { |
48 | 48 | $id = $sound->id; |
49 | 49 | foreach ($request->sounds as $soundsNew) { |
50 | - if ($soundsNew['id'] == $id) { |
|
51 | - $sound->update(['sort_order' => $soundsNew['sort_order']]); |
|
50 | + if ($soundsNew[ 'id' ] == $id) { |
|
51 | + $sound->update([ 'sort_order' => $soundsNew[ 'sort_order' ] ]); |
|
52 | 52 | } |
53 | 53 | } |
54 | 54 | } |
@@ -75,12 +75,12 @@ discard block |
||
75 | 75 | $this->validate($request, [ |
76 | 76 | 'sound.enabled' => 'required|boolean', |
77 | 77 | ]); |
78 | - $sound = SoundServices::updateSoundStatus($id, $request->sound['enabled']); |
|
78 | + $sound = SoundServices::updateSoundStatus($id, $request->sound[ 'enabled' ]); |
|
79 | 79 | $status = 'disabled'; |
80 | 80 | if ($sound->enabled) { |
81 | 81 | $status = 'enabled'; |
82 | 82 | } |
83 | - $message = trans('admin.messages.status-updated', ['status' => $status, 'title' => $sound->title]); |
|
83 | + $message = trans('admin.messages.status-updated', [ 'status' => $status, 'title' => $sound->title ]); |
|
84 | 84 | |
85 | 85 | ActivityLogger::activity($message); |
86 | 86 | |
@@ -106,7 +106,7 @@ discard block |
||
106 | 106 | ActivityLogger::activity('Sounds deleted: '.$sound); |
107 | 107 | |
108 | 108 | return response()->json([ |
109 | - 'message' => trans('admin.messages.sound-deleted', ['title' => $sound->title]), |
|
109 | + 'message' => trans('admin.messages.sound-deleted', [ 'title' => $sound->title ]), |
|
110 | 110 | ], 200); |
111 | 111 | } |
112 | 112 | } |