Passed
Push — master ( 24244a...1ea844 )
by Mohammad
02:39
created
src/Utility/Controller.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -344,9 +344,10 @@
 block discarded – undo
344 344
         }
345 345
 
346 346
         if ($entity) {
347
-            if($appendEntity)
348
-                return response()->json(  ['status' => true, 'message' => __('messages.success'), 'data' => $entity],
347
+            if($appendEntity) {
348
+                            return response()->json(  ['status' => true, 'message' => __('messages.success'), 'data' => $entity],
349 349
                     JsonResponse::HTTP_OK);
350
+            }
350 351
             return response()->json(null, JsonResponse::HTTP_NO_CONTENT);
351 352
         }
352 353
 
Please login to merge, or discard this patch.
src/Utility/AbstractRepository.php 1 patch
Braces   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -100,9 +100,9 @@
 block discarded – undo
100 100
                             }
101 101
                         });
102 102
                     });
103
+                } else {
104
+                                    $latest->where($columns, 'like', "%" . $criteria['search'] . "%", 'or');
103 105
                 }
104
-                else
105
-                    $latest->where($columns, 'like', "%" . $criteria['search'] . "%", 'or');
106 106
             }
107 107
         }
108 108
         unset($criteria['search']);
Please login to merge, or discard this patch.