@@ -18,11 +18,11 @@ discard block |
||
| 18 | 18 | $foreignValue = request('foreign_value'); |
| 19 | 19 | $table = decrypt(request('table')); |
| 20 | 20 | $sqlCondition = decrypt(request('sql_condition')); |
| 21 | - if($foreignKey && $foreignValue && $table) { |
|
| 21 | + if ($foreignKey && $foreignValue && $table) { |
|
| 22 | 22 | |
| 23 | 23 | $data = DB::table($table) |
| 24 | 24 | ->where($foreignKey, $foreignValue); |
| 25 | - if($sqlCondition) { |
|
| 25 | + if ($sqlCondition) { |
|
| 26 | 26 | $data->whereRaw($sqlCondition); |
| 27 | 27 | } |
| 28 | 28 | |
@@ -30,7 +30,7 @@ discard block |
||
| 30 | 30 | |
| 31 | 31 | return response()->json(['status'=>true, 'data'=>$data], 200, ["X-Frame-Options"=>"SAMEORIGIN"]); |
| 32 | 32 | |
| 33 | - }else{ |
|
| 33 | + } else { |
|
| 34 | 34 | return response()->json(['status'=>false]); |
| 35 | 35 | } |
| 36 | 36 | } |
@@ -30,7 +30,7 @@ |
||
| 30 | 30 | |
| 31 | 31 | return response()->json(['status'=>true, 'data'=>$data], 200, ["X-Frame-Options"=>"SAMEORIGIN"]); |
| 32 | 32 | |
| 33 | - }else{ |
|
| 33 | + } else{ |
|
| 34 | 34 | return response()->json(['status'=>false]); |
| 35 | 35 | } |
| 36 | 36 | } |