@@ -65,7 +65,7 @@ discard block |
||
65 | 65 | { |
66 | 66 | $this->cbLoader(); |
67 | 67 | |
68 | - $menus= DB::table('cms_menus')->whereRaw("cms_menus.id IN (select id_cms_menus from cms_menus_privileges where id_cms_privileges = '".CRUDBooster::myPrivilegeId()."')")->where('is_dashboard', 1)->where('is_active', 1)->first(); |
|
68 | + $menus = DB::table('cms_menus')->whereRaw("cms_menus.id IN (select id_cms_menus from cms_menus_privileges where id_cms_privileges = '".CRUDBooster::myPrivilegeId()."')")->where('is_dashboard', 1)->where('is_active', 1)->first(); |
|
69 | 69 | |
70 | 70 | $slug = str_replace("statistic_builder/show/", "", $menus->path); |
71 | 71 | |
@@ -90,7 +90,7 @@ discard block |
||
90 | 90 | { |
91 | 91 | $this->cbLoader(); |
92 | 92 | |
93 | - if (! CRUDBooster::isSuperadmin()) { |
|
93 | + if (!CRUDBooster::isSuperadmin()) { |
|
94 | 94 | CRUDBooster::insertLog(trans("crudbooster.log_try_view", ['name' => 'Builder', 'module' => 'Statistic'])); |
95 | 95 | CRUDBooster::redirect(CRUDBooster::adminPath(), trans('crudbooster.denied_access')); |
96 | 96 | } |
@@ -170,7 +170,7 @@ discard block |
||
170 | 170 | { |
171 | 171 | $this->cbLoader(); |
172 | 172 | |
173 | - if (! CRUDBooster::isSuperadmin()) { |
|
173 | + if (!CRUDBooster::isSuperadmin()) { |
|
174 | 174 | CRUDBooster::insertLog(trans("crudbooster.log_try_view", ['name' => 'Edit Component', 'module' => 'Statistic'])); |
175 | 175 | CRUDBooster::redirect(CRUDBooster::adminPath(), trans('crudbooster.denied_access')); |
176 | 176 | } |
@@ -196,7 +196,7 @@ discard block |
||
196 | 196 | |
197 | 197 | public function getDeleteComponent($id) |
198 | 198 | { |
199 | - if (! CRUDBooster::isSuperadmin()) { |
|
199 | + if (!CRUDBooster::isSuperadmin()) { |
|
200 | 200 | CRUDBooster::insertLog(trans("crudbooster.log_try_view", ['name' => 'Delete Component', 'module' => 'Statistic'])); |
201 | 201 | CRUDBooster::redirect(CRUDBooster::adminPath(), trans('crudbooster.denied_access')); |
202 | 202 | } |
@@ -447,7 +447,7 @@ discard block |
||
447 | 447 | </tr> |
448 | 448 | </thead> |
449 | 449 | <tbody> |
450 | - <?php $index = 0;?> |
|
450 | + <?php $index = 0; ?> |
|
451 | 451 | @foreach($cb_form as $form) |
452 | 452 | <tr> |
453 | 453 | <td><input type='text' value='{{$form["label"]}}' placeholder="Input field label" onclick='showColumnSuggest(this)' |
@@ -476,7 +476,7 @@ discard block |
||
476 | 476 | $types = file_get_contents($types); |
477 | 477 | $types = json_decode($types); |
478 | 478 | |
479 | - if($types): |
|
479 | + if ($types): |
|
480 | 480 | ?> |
481 | 481 | |
482 | 482 | @if($types->alert) |
@@ -486,12 +486,12 @@ discard block |
||
486 | 486 | @endif |
487 | 487 | |
488 | 488 | <?php |
489 | - if($types->attribute->required): |
|
490 | - foreach($types->attribute->required as $key=>$val): |
|
489 | + if ($types->attribute->required): |
|
490 | + foreach ($types->attribute->required as $key=>$val): |
|
491 | 491 | @$value = $form[$key]; |
492 | - if(is_object($val)): |
|
492 | + if (is_object($val)): |
|
493 | 493 | |
494 | - if($val->type && $val->type == 'radio'): |
|
494 | + if ($val->type && $val->type == 'radio'): |
|
495 | 495 | ?> |
496 | 496 | <div class="form-group"> |
497 | 497 | <label>{{$key}}</label> |
@@ -509,7 +509,7 @@ discard block |
||
509 | 509 | <input type="text" name="option[{{$index}}][{{$key}}]" placeholder="{{$val->placeholder}}" value="{{$value}}" |
510 | 510 | class="form-control"> |
511 | 511 | </div> |
512 | - <?php endif;?> |
|
512 | + <?php endif; ?> |
|
513 | 513 | <?php else:?> |
514 | 514 | |
515 | 515 | <div class="form-group"> |
@@ -517,25 +517,25 @@ discard block |
||
517 | 517 | <input type="text" name="option[{{$index}}][{{$key}}]" placeholder="{{$val}}" value="{{$value}}" class="form-control"> |
518 | 518 | </div> |
519 | 519 | |
520 | - <?php endif;?> |
|
521 | - <?php endforeach; endif;?> |
|
520 | + <?php endif; ?> |
|
521 | + <?php endforeach; endif; ?> |
|
522 | 522 | |
523 | 523 | |
524 | 524 | |
525 | 525 | <?php |
526 | - if($types->attribute->requiredOne): |
|
527 | - foreach($types->attribute->requiredOne as $key=>$val): |
|
526 | + if ($types->attribute->requiredOne): |
|
527 | + foreach ($types->attribute->requiredOne as $key=>$val): |
|
528 | 528 | @$value = $form[$key]; |
529 | 529 | ?> |
530 | 530 | <div class="form-group"> |
531 | 531 | <label>{{$key}}</label> |
532 | 532 | <input type="text" name="option[{{$index}}][{{$key}}]" placeholder="{{$val}}" value="{{$value}}" class="form-control"> |
533 | 533 | </div> |
534 | - <?php endforeach; endif;?> |
|
534 | + <?php endforeach; endif; ?> |
|
535 | 535 | |
536 | 536 | <?php |
537 | - if($types->attribute->optional): |
|
538 | - foreach($types->attribute->optional as $key=>$val): |
|
537 | + if ($types->attribute->optional): |
|
538 | + foreach ($types->attribute->optional as $key=>$val): |
|
539 | 539 | @$value = $form[$key]; |
540 | 540 | |
541 | 541 | ?> |
@@ -549,10 +549,10 @@ discard block |
||
549 | 549 | class="form-control"> |
550 | 550 | @endif |
551 | 551 | </div> |
552 | - <?php endforeach; endif;?> |
|
552 | + <?php endforeach; endif; ?> |
|
553 | 553 | |
554 | 554 | |
555 | - <?php endif;?> |
|
555 | + <?php endif; ?> |
|
556 | 556 | </div> |
557 | 557 | </td> |
558 | 558 | <td> |
@@ -562,7 +562,7 @@ discard block |
||
562 | 562 | <a href="javascript:void(0)" class="btn btn-success btn-down"><i class='fa fa-arrow-down'></i></a> |
563 | 563 | </td> |
564 | 564 | </tr> |
565 | - <?php $index++;?> |
|
565 | + <?php $index++; ?> |
|
566 | 566 | @endforeach |
567 | 567 | |
568 | 568 | <tr id='tr-sample' style="display: none"> |
@@ -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 |
@@ -12,7 +12,7 @@ |
||
12 | 12 | */ |
13 | 13 | public function up() |
14 | 14 | { |
15 | - Schema::create('cms_privileges_roles', function (Blueprint $table) { |
|
15 | + Schema::create('cms_privileges_roles', function(Blueprint $table) { |
|
16 | 16 | $table->increments('id'); |
17 | 17 | |
18 | 18 | $table->boolean('is_visible')->nullable(); |
@@ -12,7 +12,7 @@ |
||
12 | 12 | */ |
13 | 13 | public function up() |
14 | 14 | { |
15 | - Schema::create('cms_apicustom', function (Blueprint $table) { |
|
15 | + Schema::create('cms_apicustom', function(Blueprint $table) { |
|
16 | 16 | $table->increments('id'); |
17 | 17 | |
18 | 18 | $table->string('permalink')->nullable(); |
@@ -12,7 +12,7 @@ discard block |
||
12 | 12 | */ |
13 | 13 | public function up() |
14 | 14 | { |
15 | - Schema::table('cms_apicustom', function (Blueprint $table) { |
|
15 | + Schema::table('cms_apicustom', function(Blueprint $table) { |
|
16 | 16 | // |
17 | 17 | $table->longText('parameters')->nullable(); |
18 | 18 | }); |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | */ |
26 | 26 | public function down() |
27 | 27 | { |
28 | - Schema::table('cms_apicustom', function (Blueprint $table) { |
|
28 | + Schema::table('cms_apicustom', function(Blueprint $table) { |
|
29 | 29 | // |
30 | 30 | $table->dropColumn('parameters'); |
31 | 31 | }); |
@@ -12,7 +12,7 @@ |
||
12 | 12 | */ |
13 | 13 | public function up() |
14 | 14 | { |
15 | - Schema::create('cms_moduls', function (Blueprint $table) { |
|
15 | + Schema::create('cms_moduls', function(Blueprint $table) { |
|
16 | 16 | $table->increments('id'); |
17 | 17 | |
18 | 18 | $table->string('name')->nullable(); |
@@ -12,7 +12,7 @@ |
||
12 | 12 | */ |
13 | 13 | public function up() |
14 | 14 | { |
15 | - Schema::create('cms_notifications', function (Blueprint $table) { |
|
15 | + Schema::create('cms_notifications', function(Blueprint $table) { |
|
16 | 16 | $table->increments('id'); |
17 | 17 | |
18 | 18 | $table->integer('id_cms_users')->nullable(); |
@@ -12,7 +12,7 @@ discard block |
||
12 | 12 | */ |
13 | 13 | public function up() |
14 | 14 | { |
15 | - Schema::table('cms_apicustom', function (Blueprint $table) { |
|
15 | + Schema::table('cms_apicustom', function(Blueprint $table) { |
|
16 | 16 | $table->string('permalink')->nullable()->change(); |
17 | 17 | $table->string('tabel')->nullable()->change(); |
18 | 18 | $table->string('aksi')->nullable()->change(); |
@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | */ |
34 | 34 | public function down() |
35 | 35 | { |
36 | - Schema::table('cms_settings', function (Blueprint $table) { |
|
36 | + Schema::table('cms_settings', function(Blueprint $table) { |
|
37 | 37 | // |
38 | 38 | }); |
39 | 39 | } |
@@ -13,7 +13,7 @@ discard block |
||
13 | 13 | */ |
14 | 14 | public function up() |
15 | 15 | { |
16 | - Schema::table('cms_moduls', function (Blueprint $table) { |
|
16 | + Schema::table('cms_moduls', function(Blueprint $table) { |
|
17 | 17 | $table->softDeletes(); |
18 | 18 | }); |
19 | 19 | } |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | */ |
26 | 26 | public function down() |
27 | 27 | { |
28 | - Schema::table('cms_moduls', function (Blueprint $table) { |
|
28 | + Schema::table('cms_moduls', function(Blueprint $table) { |
|
29 | 29 | $table->dropSoftDeletes(); |
30 | 30 | }); |
31 | 31 | } |