Passed
Push — dev5 ( 2deb8a...4b89af )
by Ron
06:07
created
app/Http/Controllers/Admin/UserController.php 1 patch
Braces   +11 added lines, -6 removed lines patch added patch discarded remove patch
@@ -168,8 +168,7 @@  discard block
 block discarded – undo
168 168
         switch($type)
169 169
         {
170 170
             case 'active':
171
-                $userList = new UserCollection(User::where('active', 1)->with(['UserLogins' => function($query)
172
-                {
171
+                $userList = new UserCollection(User::where('active', 1)->with(['UserLogins' => function($query) {
173 172
                     $query->latest()->limit(1);
174 173
                 }])->get()->makeVisible('user_id'));
175 174
                 $route    = 'admin.user.edit';
@@ -198,12 +197,18 @@  discard block
 block discarded – undo
198 197
         $user  = new UserResource(User::find($id));
199 198
 
200 199
         $roleArr = [];
201
-        foreach ($roles as $role) {
202
-            if ($role->role_id == 1 && Auth::user()->role_id != 1) {
200
+        foreach ($roles as $role)
201
+        {
202
+            if ($role->role_id == 1 && Auth::user()->role_id != 1)
203
+            {
203 204
                 continue;
204
-            } else if ($role->role_id == 2 && Auth::user()->role_id > 1) {
205
+            }
206
+            else if ($role->role_id == 2 && Auth::user()->role_id > 1)
207
+            {
205 208
                 continue;
206
-            } else {
209
+            }
210
+            else
211
+            {
207 212
                 // $roleArr[$role->role_id] = $role->name;
208 213
                 $roleArr[] = [
209 214
                     'value' => $role->role_id,
Please login to merge, or discard this patch.