@@ -363,7 +363,7 @@ discard block |
||
363 | 363 | $columns_table[$index]['type_data'] = CRUDBooster::getFieldType($table, $field); |
364 | 364 | $columns_table[$index]['field'] = $table.'_'.$field; |
365 | 365 | $columns_table[$index]['field_raw'] = $table.'.'.$field; |
366 | - }else{ |
|
366 | + } else{ |
|
367 | 367 | $result->addselect($table.'.'.$field); |
368 | 368 | $columns_table[$index]['type_data'] = CRUDBooster::getFieldType($table, $field); |
369 | 369 | $columns_table[$index]['field'] = $field; |
@@ -1154,8 +1154,9 @@ discard block |
||
1154 | 1154 | $lastInsertId = $id = DB::table($this->table)->insertGetId($this->arr); |
1155 | 1155 | |
1156 | 1156 | //fix bug if primary key is uuid |
1157 | - if($this->arr[$this->primary_key]!=$id) |
|
1158 | - $id = $this->arr[$this->primary_key]; |
|
1157 | + if($this->arr[$this->primary_key]!=$id) { |
|
1158 | + $id = $this->arr[$this->primary_key]; |
|
1159 | + } |
|
1159 | 1160 | |
1160 | 1161 | //Looping Data Input Again After Insert |
1161 | 1162 | foreach ($this->data_inputan as $ro) { |
@@ -1350,7 +1351,9 @@ discard block |
||
1350 | 1351 | } |
1351 | 1352 | if ($ro['relationship_table'] && $ro["datatable_orig"] != "") { |
1352 | 1353 | $params = explode("|", $ro['datatable_orig']); |
1353 | - if(!isset($params[2])) $params[2] = "id"; |
|
1354 | + if(!isset($params[2])) { |
|
1355 | + $params[2] = "id"; |
|
1356 | + } |
|
1354 | 1357 | DB::table($params[0])->where($params[2], $id)->update([$params[1] => implode(",",$inputdata)]); |
1355 | 1358 | } |
1356 | 1359 | } |
@@ -502,22 +502,28 @@ |
||
502 | 502 | |
503 | 503 | </div> |
504 | 504 | |
505 | - <?php else:?> |
|
505 | + <?php else { |
|
506 | + :?> |
|
506 | 507 | |
507 | 508 | <div class="form-group"> |
508 | 509 | <label>{{$key}}</label> |
509 | 510 | <input type="text" name="option[{{$index}}][{{$key}}]" placeholder="{{$val->placeholder}}" value="{{$value}}" |
510 | 511 | class="form-control"> |
511 | 512 | </div> |
512 | - <?php endif;?> |
|
513 | - <?php else:?> |
|
513 | + <?php endif; |
|
514 | +} |
|
515 | +?> |
|
516 | + <?php else { |
|
517 | + :?> |
|
514 | 518 | |
515 | 519 | <div class="form-group"> |
516 | 520 | <label>{{$key}}</label> |
517 | 521 | <input type="text" name="option[{{$index}}][{{$key}}]" placeholder="{{$val}}" value="{{$value}}" class="form-control"> |
518 | 522 | </div> |
519 | 523 | |
520 | - <?php endif;?> |
|
524 | + <?php endif; |
|
525 | +} |
|
526 | +?> |
|
521 | 527 | <?php endforeach; endif;?> |
522 | 528 | |
523 | 529 |