Scrutinizer GitHub App not installed

We could not synchronize checks via GitHub's checks API since Scrutinizer's GitHub App is not installed for this repository.

Install GitHub App

Test Setup Failed
Pull Request — master (#218)
by
unknown
07:17
created
app/Http/Controllers/Admin/MonsterCrudController.php 1 patch
Spacing   +89 added lines, -89 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
                 'options' => [0 => 'Yes', 1 => 'No'],
62 62
                 'wrapper' => [
63 63
                     'element' => 'span',
64
-                    'class'   => function ($crud, $column, $entry, $related_key) {
64
+                    'class'   => function($crud, $column, $entry, $related_key) {
65 65
                         if ($column['text'] == 'Yes') {
66 66
                             return 'badge badge-success';
67 67
                         }
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
                 'name'     => 'created_at',
81 81
                 'label'    => 'Created At',
82 82
                 'type'     => 'closure',
83
-                'function' => function ($entry) {
83
+                'function' => function($entry) {
84 84
                     return 'Created on '.$entry->created_at;
85 85
                 },
86 86
             ],
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
                 'label'         => 'Text and Email', // Table column heading
107 107
                 'type'          => 'model_function',
108 108
                 'function_name' => 'getTextAndEmailAttribute', // the method in your Model
109
-                'searchLogic'   => function ($query, $column, $searchTerm) {
109
+                'searchLogic'   => function($query, $column, $searchTerm) {
110 110
                     $query->orWhere('email', 'like', '%'.$searchTerm.'%');
111 111
                     $query->orWhere('text', 'like', '%'.$searchTerm.'%');
112 112
                 },
@@ -122,7 +122,7 @@  discard block
 block discarded – undo
122 122
                 'type'        => 'radio',
123 123
                 'options'     => [0 => 'Draft', 1 => 'Published', 2 => 'Other'],
124 124
             ],
125
-            [   // 1-n relationship
125
+            [// 1-n relationship
126 126
                 'label'     => 'Select', // Table column heading
127 127
                 'type'      => 'select',
128 128
                 'name'      => 'select', // the column that contains the ID of that connected entity;
@@ -130,18 +130,18 @@  discard block
 block discarded – undo
130 130
                 'attribute' => 'name', // foreign key attribute that is shown to user
131 131
                 'model'     => "Backpack\NewsCRUD\app\Models\Category", // foreign key model
132 132
                 'wrapper'   => [
133
-                    'href' => function ($crud, $column, $entry, $related_key) {
133
+                    'href' => function($crud, $column, $entry, $related_key) {
134 134
                         return backpack_url('category/'.$related_key.'/show');
135 135
                     },
136 136
                 ],
137 137
             ],
138
-            [   // select_from_array
138
+            [// select_from_array
139 139
                 'name'    => 'select_from_array',
140 140
                 'label'   => 'Select_from_array',
141 141
                 'type'    => 'select_from_array',
142 142
                 'options' => ['one' => 'One', 'two' => 'Two', 'three' => 'Three'],
143 143
             ],
144
-            [   // select_multiple: n-n relationship (with pivot table)
144
+            [// select_multiple: n-n relationship (with pivot table)
145 145
                 'label'     => 'Select_multiple', // Table column heading
146 146
                 'type'      => 'select_multiple',
147 147
                 'name'      => 'tags', // the method that defines the relationship in your Model
@@ -149,18 +149,18 @@  discard block
 block discarded – undo
149 149
                 'attribute' => 'name', // foreign key attribute that is shown to user
150 150
                 'model'     => "Backpack\NewsCRUD\app\Models\Tag", // foreign key model
151 151
                 'wrapper'   => [
152
-                    'href' => function ($crud, $column, $entry, $related_key) {
152
+                    'href' => function($crud, $column, $entry, $related_key) {
153 153
                         return backpack_url('tag/'.$related_key.'/show');
154 154
                     },
155 155
                 ],
156 156
             ],
157
-            [   // select_multiple: n-n relationship (with pivot table)
157
+            [// select_multiple: n-n relationship (with pivot table)
158 158
                 'label'     => 'Relationship_count', // Table column heading
159 159
                 'type'      => 'relationship_count',
160 160
                 'name'      => 'categories', // the method that defines the relationship in your Model
161 161
                 'entity'    => 'categories', // the method that defines the relationship in your Model
162 162
                 'wrapper'   => [
163
-                    'href' => function ($crud, $column, $entry, $related_key) {
163
+                    'href' => function($crud, $column, $entry, $related_key) {
164 164
                         return backpack_url('category');
165 165
                     },
166 166
                 ],
@@ -186,7 +186,7 @@  discard block
 block discarded – undo
186 186
 
187 187
         $this->crud->set('show.contentClass', 'col-md-12');
188 188
 
189
-        $this->crud->addColumn([   // SimpleMDE
189
+        $this->crud->addColumn([// SimpleMDE
190 190
             'name'  => 'simplemde',
191 191
             'label' => 'Markdown (SimpleMDE)',
192 192
             'type'  => 'markdown',
@@ -241,7 +241,7 @@  discard block
 block discarded – undo
241 241
             'type'  => 'phone',
242 242
         ]);
243 243
 
244
-        $this->crud->addColumn([   // Upload
244
+        $this->crud->addColumn([// Upload
245 245
             'name'   => 'upload_multiple',
246 246
             'label'  => 'Upload Multiple',
247 247
             'type'   => 'upload_multiple',
@@ -273,34 +273,34 @@  discard block
 block discarded – undo
273 273
     protected function addCustomCrudFilters()
274 274
     {
275 275
         $this->crud->addFilter(
276
-            [ // add a "simple" filter called Draft
276
+            [// add a "simple" filter called Draft
277 277
                 'type'  => 'simple',
278 278
                 'name'  => 'checkbox',
279 279
                 'label' => 'Simple',
280 280
             ],
281 281
             false, // the simple filter has no values, just the "Draft" label specified above
282
-        function () { // if the filter is active (the GET parameter "draft" exits)
282
+        function() { // if the filter is active (the GET parameter "draft" exits)
283 283
             $this->crud->addClause('where', 'checkbox', '1');
284 284
         }
285 285
         );
286 286
 
287
-        $this->crud->addFilter([ // dropdown filter
287
+        $this->crud->addFilter([// dropdown filter
288 288
             'name' => 'select_from_array',
289 289
             'type' => 'dropdown',
290 290
             'label'=> 'Dropdown',
291
-        ], ['one' => 'One', 'two' => 'Two', 'three' => 'Three'], function ($value) {
291
+        ], ['one' => 'One', 'two' => 'Two', 'three' => 'Three'], function($value) {
292 292
             // if the filter is active
293 293
             $this->crud->addClause('where', 'select_from_array', $value);
294 294
         });
295 295
 
296 296
         $this->crud->addFilter(
297
-            [ // text filter
297
+            [// text filter
298 298
                 'type'  => 'text',
299 299
                 'name'  => 'text',
300 300
                 'label' => 'Text',
301 301
             ],
302 302
             false,
303
-            function ($value) { // if the filter is active
303
+            function($value) { // if the filter is active
304 304
                 $this->crud->addClause('where', 'text', 'LIKE', "%$value%");
305 305
             }
306 306
         );
@@ -314,7 +314,7 @@  discard block
 block discarded – undo
314 314
                 'label_to'   => 'max value',
315 315
             ],
316 316
             false,
317
-            function ($value) { // if the filter is active
317
+            function($value) { // if the filter is active
318 318
                 $range = json_decode($value);
319 319
                 if ($range->from && $range->to) {
320 320
                     $this->crud->addClause('where', 'number', '>=', (float) $range->from);
@@ -324,19 +324,19 @@  discard block
 block discarded – undo
324 324
         );
325 325
 
326 326
         $this->crud->addFilter(
327
-            [ // date filter
327
+            [// date filter
328 328
                 'type'  => 'date',
329 329
                 'name'  => 'date',
330 330
                 'label' => 'Date',
331 331
             ],
332 332
             false,
333
-            function ($value) { // if the filter is active, apply these constraints
333
+            function($value) { // if the filter is active, apply these constraints
334 334
                 $this->crud->addClause('where', 'date', '=', $value);
335 335
             }
336 336
         );
337 337
 
338 338
         $this->crud->addFilter(
339
-            [ // daterange filter
339
+            [// daterange filter
340 340
                 'type' => 'date_range',
341 341
                 'name' => 'date_range',
342 342
                 'label'=> 'Date range',
@@ -348,44 +348,44 @@  discard block
 block discarded – undo
348 348
                 // ]
349 349
             ],
350 350
             false,
351
-            function ($value) { // if the filter is active, apply these constraints
351
+            function($value) { // if the filter is active, apply these constraints
352 352
                 $dates = json_decode($value);
353 353
                 $this->crud->addClause('where', 'date', '>=', $dates->from);
354 354
                 $this->crud->addClause('where', 'date', '<=', $dates->to);
355 355
             }
356 356
         );
357 357
 
358
-        $this->crud->addFilter([ // select2 filter
358
+        $this->crud->addFilter([// select2 filter
359 359
             'name' => 'select2',
360 360
             'type' => 'select2',
361 361
             'label'=> 'Select2',
362
-        ], function () {
362
+        ], function() {
363 363
             return \Backpack\NewsCRUD\app\Models\Category::all()->keyBy('id')->pluck('name', 'id')->toArray();
364
-        }, function ($value) { // if the filter is active
364
+        }, function($value) { // if the filter is active
365 365
             $this->crud->addClause('where', 'select2', $value);
366 366
         });
367 367
 
368
-        $this->crud->addFilter([ // select2_multiple filter
368
+        $this->crud->addFilter([// select2_multiple filter
369 369
             'name' => 'select2_multiple',
370 370
             'type' => 'select2_multiple',
371 371
             'label'=> 'S2 multiple',
372
-        ], function () {
372
+        ], function() {
373 373
             return \Backpack\NewsCRUD\app\Models\Category::all()->keyBy('id')->pluck('name', 'id')->toArray();
374
-        }, function ($values) { // if the filter is active
374
+        }, function($values) { // if the filter is active
375 375
             foreach (json_decode($values) as $key => $value) {
376 376
                 $this->crud->addClause('orWhere', 'select2', $value);
377 377
             }
378 378
         });
379 379
 
380 380
         $this->crud->addFilter(
381
-            [ // select2_ajax filter
381
+            [// select2_ajax filter
382 382
                 'name'        => 'select2_from_ajax',
383 383
                 'type'        => 'select2_ajax',
384 384
                 'label'       => 'S2 Ajax',
385 385
                 'placeholder' => 'Pick an article',
386 386
             ],
387 387
             url('api/article-search'), // the ajax route
388
-            function ($value) { // if the filter is active
388
+            function($value) { // if the filter is active
389 389
                 $this->crud->addClause('where', 'select2_from_ajax', $value);
390 390
             }
391 391
         );
@@ -412,20 +412,20 @@  discard block
 block discarded – undo
412 412
                     'class' => 'form-group col-md-6',
413 413
                 ],
414 414
             ],
415
-            [   // Textarea
415
+            [// Textarea
416 416
                 'name'  => 'textarea',
417 417
                 'label' => 'Textarea',
418 418
                 'type'  => 'textarea',
419 419
                 'tab'   => 'Simple',
420 420
             ],
421
-            [   // Number
421
+            [// Number
422 422
                 'name'              => 'number',
423 423
                 'label'             => 'Number',
424 424
                 'type'              => 'number',
425 425
                 'tab'               => 'Simple',
426 426
                 'wrapperAttributes' => ['class' => 'form-group col-md-3'],
427 427
             ],
428
-            [   // Number
428
+            [// Number
429 429
                 'name'              => 'float',
430 430
                 'label'             => 'Float',
431 431
                 'type'              => 'number',
@@ -433,7 +433,7 @@  discard block
 block discarded – undo
433 433
                 'tab'               => 'Simple',
434 434
                 'wrapperAttributes' => ['class' => 'form-group col-md-3'],
435 435
             ],
436
-            [   // Number
436
+            [// Number
437 437
                 'name'              => 'number_with_prefix',
438 438
                 'label'             => 'Number with prefix',
439 439
                 'type'              => 'number',
@@ -443,7 +443,7 @@  discard block
 block discarded – undo
443 443
                 'tab'               => 'Simple',
444 444
                 'wrapperAttributes' => ['class' => 'form-group col-md-3'],
445 445
             ],
446
-            [   // Number
446
+            [// Number
447 447
                 'name'              => 'number_with_suffix',
448 448
                 'label'             => 'Number with suffix',
449 449
                 'type'              => 'number',
@@ -453,7 +453,7 @@  discard block
 block discarded – undo
453 453
                 'tab'               => 'Simple',
454 454
                 'wrapperAttributes' => ['class' => 'form-group col-md-3'],
455 455
             ],
456
-            [   // Number
456
+            [// Number
457 457
                 'name'              => 'text_with_both_prefix_and_suffix',
458 458
                 'label'             => 'Text with both prefix and suffix',
459 459
                 'type'              => 'number',
@@ -464,7 +464,7 @@  discard block
 block discarded – undo
464 464
                 'tab'               => 'Simple',
465 465
                 'wrapperAttributes' => ['class' => 'form-group col-md-6'],
466 466
             ],
467
-            [   // Password
467
+            [// Password
468 468
                 'name'              => 'password',
469 469
                 'label'             => 'Password',
470 470
                 'type'              => 'password',
@@ -475,7 +475,7 @@  discard block
 block discarded – undo
475 475
                 'name'    => 'radio', // the name of the db column
476 476
                 'label'   => 'Status (radio)', // the input label
477 477
                 'type'    => 'radio',
478
-                'options' => [ // the key will be stored in the db, the value will be shown as label;
478
+                'options' => [// the key will be stored in the db, the value will be shown as label;
479 479
                     0 => 'Draft',
480 480
                     1 => 'Published',
481 481
                     2 => 'Other',
@@ -484,13 +484,13 @@  discard block
 block discarded – undo
484 484
                 'inline' => true, // show the radios all on the same line?
485 485
                 'tab'    => 'Simple',
486 486
             ],
487
-            [   // Checkbox
487
+            [// Checkbox
488 488
                 'name'  => 'checkbox',
489 489
                 'label' => 'I have not read the terms and conditions and I never will (checkbox)',
490 490
                 'type'  => 'checkbox',
491 491
                 'tab'   => 'Simple',
492 492
             ],
493
-            [   // Hidden
493
+            [// Hidden
494 494
                 'name'    => 'hidden',
495 495
                 'type'    => 'hidden',
496 496
                 'default' => '6318',
@@ -506,21 +506,21 @@  discard block
 block discarded – undo
506 506
         // -----------------
507 507
 
508 508
         return [
509
-            [   // Month
509
+            [// Month
510 510
                 'name'              => 'week',
511 511
                 'label'             => 'Week',
512 512
                 'type'              => 'week',
513 513
                 'wrapperAttributes' => ['class' => 'form-group col-md-6'],
514 514
                 'tab'               => 'Time and space',
515 515
             ],
516
-            [   // Month
516
+            [// Month
517 517
                 'name'              => 'month',
518 518
                 'label'             => 'Month',
519 519
                 'type'              => 'month',
520 520
                 'wrapperAttributes' => ['class' => 'form-group col-md-6'],
521 521
                 'tab'               => 'Time and space',
522 522
             ],
523
-            [   // Date
523
+            [// Date
524 524
                 'name'       => 'date',
525 525
                 'label'      => 'Date (HTML5 spec)',
526 526
                 'type'       => 'date',
@@ -531,7 +531,7 @@  discard block
 block discarded – undo
531 531
                 'wrapperAttributes' => ['class' => 'form-group col-md-6'],
532 532
                 'tab'               => 'Time and space',
533 533
             ],
534
-            [   // Date
534
+            [// Date
535 535
                 'name'  => 'date_picker',
536 536
                 'label' => 'Date picker (jQuery plugin)',
537 537
                 'type'  => 'date_picker',
@@ -544,14 +544,14 @@  discard block
 block discarded – undo
544 544
                 'wrapperAttributes' => ['class' => 'form-group col-md-6'],
545 545
                 'tab'               => 'Time and space',
546 546
             ],
547
-            [   // DateTime
547
+            [// DateTime
548 548
                 'name'              => 'datetime',
549 549
                 'label'             => 'Datetime (HTML5 spec)',
550 550
                 'type'              => 'datetime',
551 551
                 'wrapperAttributes' => ['class' => 'form-group col-md-6'],
552 552
                 'tab'               => 'Time and space',
553 553
             ],
554
-            [   // DateTime
554
+            [// DateTime
555 555
                 'name'  => 'datetime_picker',
556 556
                 'label' => 'Datetime picker (jQuery plugin)',
557 557
                 'type'  => 'datetime_picker',
@@ -563,19 +563,19 @@  discard block
 block discarded – undo
563 563
                 'wrapperAttributes' => ['class' => 'form-group col-md-6'],
564 564
                 'tab'               => 'Time and space',
565 565
             ],
566
-            [ // Date_range
566
+            [// Date_range
567 567
                 'name'       => ['start_date', 'end_date'], // a unique name for this field
568 568
                 'label'      => 'Date Range',
569 569
                 'type'       => 'date_range',
570 570
                 'default'    => ['2020-03-28 01:01', '2020-04-05 02:00'],
571 571
                 // OPTIONALS
572
-                'date_range_options' => [ // options sent to daterangepicker.js
572
+                'date_range_options' => [// options sent to daterangepicker.js
573 573
                     'timePicker' => true,
574 574
                     'locale'     => ['format' => 'DD/MM/YYYY HH:mm'],
575 575
                 ],
576 576
                 'tab' => 'Time and space',
577 577
             ],
578
-            [   // Address
578
+            [// Address
579 579
                 'name'  => 'address_algolia_string',
580 580
                 'label' => 'Address_algolia (saved in db as string)',
581 581
                 'type'  => 'address_algolia',
@@ -584,7 +584,7 @@  discard block
 block discarded – undo
584 584
                 // 'store_as_json' => true,
585 585
                 'tab'           => 'Time and space',
586 586
             ],
587
-            [   // Address
587
+            [// Address
588 588
                 'name'  => 'address_algolia',
589 589
                 'label' => 'Address_algolia (stored in db as json)',
590 590
                 'type'  => 'address_algolia',
@@ -605,13 +605,13 @@  discard block
 block discarded – undo
605 605
             // -----------------
606 606
             // n-n relationships
607 607
             // -----------------
608
-            [   // CustomHTML
608
+            [// CustomHTML
609 609
                 'name'  => 'select_n_n_heading',
610 610
                 'type'  => 'custom_html',
611 611
                 'value' => '<h5 class="mb-0 mt-3 text-primary">n-n Relationship with Pivot Table (HasMany, BelongsToMany)</h5>',
612 612
                 'tab'   => 'Relationships',
613 613
             ],
614
-            [       // Select_Multiple = n-n relationship
614
+            [// Select_Multiple = n-n relationship
615 615
                 'label'     => 'Select_multiple',
616 616
                 'type'      => 'select_multiple',
617 617
                 'name'      => 'tags', // the method that defines the relationship in your Model
@@ -622,7 +622,7 @@  discard block
 block discarded – undo
622 622
                 'tab'       => 'Relationships',
623 623
                 // 'wrapperAttributes' => ['class' => 'form-group col-md-12'],
624 624
             ],
625
-            [       // Select2Multiple = n-n relationship (with pivot table)
625
+            [// Select2Multiple = n-n relationship (with pivot table)
626 626
                 'label'             => 'Select2_multiple',
627 627
                 'type'              => 'select2_multiple',
628 628
                 'name'              => 'categories', // the method that defines the relationship in your Model
@@ -634,7 +634,7 @@  discard block
 block discarded – undo
634 634
                 'tab'               => 'Relationships',
635 635
                 'wrapperAttributes' => ['class' => 'form-group col-md-6'],
636 636
             ],
637
-            [ // Select2_from_ajax_multiple: n-n relationship with pivot table
637
+            [// Select2_from_ajax_multiple: n-n relationship with pivot table
638 638
                 'label'                => 'Select2_from_ajax_multiple', // Table column heading
639 639
                 'type'                 => 'select2_from_ajax_multiple',
640 640
                 'name'                 => 'articles', // the column that contains the ID of that connected entity;
@@ -648,7 +648,7 @@  discard block
 block discarded – undo
648 648
                 'tab'                  => 'Relationships',
649 649
                 'wrapperAttributes'    => ['class' => 'form-group col-md-6'],
650 650
             ],
651
-            [    // Relationship
651
+            [// Relationship
652 652
                 'label'     => 'BelongsToMany Selectable (also uses InlineCreate; Fetch using AJAX)',
653 653
                 'type'      => 'relationship',
654 654
                 'name'      => 'products',
@@ -699,13 +699,13 @@  discard block
 block discarded – undo
699 699
             // -----------------
700 700
             // 1-n relationships
701 701
             // -----------------
702
-            [   // CustomHTML
702
+            [// CustomHTML
703 703
                 'name'  => 'select_1_n_heading',
704 704
                 'type'  => 'custom_html',
705 705
                 'value' => '<h5 class="mb-0 text-primary">1-n Relationships (BelongsTo)</h5>',
706 706
                 'tab'   => 'Relationships',
707 707
             ],
708
-            [    // SELECT
708
+            [// SELECT
709 709
                 'label'             => 'Select',
710 710
                 'type'              => 'select',
711 711
                 'name'              => 'select',
@@ -715,7 +715,7 @@  discard block
 block discarded – undo
715 715
                 'tab'               => 'Relationships',
716 716
                 'wrapperAttributes' => ['class' => 'form-group col-md-6'],
717 717
             ],
718
-            [   // select_grouped
718
+            [// select_grouped
719 719
                 'label'                      => 'Select_grouped',
720 720
                 'type'                       => 'select_grouped', //https://github.com/Laravel-Backpack/CRUD/issues/502
721 721
                 'name'                       => 'select_grouped_id',
@@ -729,7 +729,7 @@  discard block
 block discarded – undo
729 729
                 'tab'                        => 'Relationships',
730 730
                 'wrapperAttributes'          => ['class' => 'form-group col-md-6'],
731 731
             ],
732
-            [    // SELECT2
732
+            [// SELECT2
733 733
                 'label'             => 'Select2',
734 734
                 'type'              => 'select2',
735 735
                 'name'              => 'select2',
@@ -739,7 +739,7 @@  discard block
 block discarded – undo
739 739
                 'tab'               => 'Relationships',
740 740
                 'wrapperAttributes' => ['class' => 'form-group col-md-4'],
741 741
             ],
742
-            [   // select2_grouped
742
+            [// select2_grouped
743 743
                 'label'                      => 'Select2_grouped',
744 744
                 'type'                       => 'select2_grouped', //https://github.com/Laravel-Backpack/CRUD/issues/502
745 745
                 'name'                       => 'select2_grouped_id',
@@ -753,7 +753,7 @@  discard block
 block discarded – undo
753 753
                 'tab'                        => 'Relationships',
754 754
                 'wrapperAttributes'          => ['class' => 'form-group col-md-4'],
755 755
             ],
756
-            [   // select2_nested
756
+            [// select2_nested
757 757
                 'name'                       => 'select2_nested_id',
758 758
                 'label'                      => 'Select2_nested',
759 759
                 'type'                       => 'select2_nested',
@@ -764,7 +764,7 @@  discard block
 block discarded – undo
764 764
                 'tab'                        => 'Relationships',
765 765
                 'wrapperAttributes'          => ['class' => 'form-group col-md-4'],
766 766
             ],
767
-            [ // select2_from_ajax: 1-n relationship
767
+            [// select2_from_ajax: 1-n relationship
768 768
                 'label'                => 'Select2_from_ajax', // Table column heading
769 769
                 'type'                 => 'select2_from_ajax',
770 770
                 'name'                 => 'select2_from_ajax', // the column that contains the ID of that connected entity;
@@ -777,14 +777,14 @@  discard block
 block discarded – undo
777 777
                 'tab'                  => 'Relationships',
778 778
                 'wrapperAttributes'    => ['class' => 'form-group col-md-12'],
779 779
             ],
780
-            [    // Relationship - nothing is explicitly defined, not even the field type
780
+            [// Relationship - nothing is explicitly defined, not even the field type
781 781
                 'label'         => 'Relationship (no AJAX, inferred attributes) <span class="badge badge-warning">New in 4.1</span>',
782 782
                 'name'          => 'icondummy',
783 783
                 'tab'           => 'Relationships',
784 784
                 // 'data_source' => backpack_url('monster/fetch/icon'),
785 785
                 'wrapperAttributes' => ['class' => 'form-group col-md-6'],
786 786
             ],
787
-            [    // Relationship - everything is explicitly defined
787
+            [// Relationship - everything is explicitly defined
788 788
                 'label'         => 'Relationship (no AJAX; also uses InlineCreate) <span class="badge badge-warning">New in 4.1</span>',
789 789
                 'type'          => 'relationship',
790 790
                 'name'          => 'fallback_icon',
@@ -799,7 +799,7 @@  discard block
 block discarded – undo
799 799
             // -----------------
800 800
             // 1-1 relationships
801 801
             // -----------------
802
-            [   // CustomHTML
802
+            [// CustomHTML
803 803
                 'name'  => 'select_1_1_heading',
804 804
                 'type'  => 'custom_html',
805 805
                 'value' => '<h5 class="mb-0 text-primary">HasOne Relationship</h5> ',
@@ -833,7 +833,7 @@  discard block
 block discarded – undo
833 833
             // -----------------
834 834
             // Polymorphic relations
835 835
             // -----------------
836
-            [   // CustomHTML
836
+            [// CustomHTML
837 837
                 'name'  => 'select_1_1_heading',
838 838
                 'type'  => 'custom_html',
839 839
                 'value' => '<h5 class="mb-0 text-primary">Polymorphic relationships</h5> ',
@@ -923,13 +923,13 @@  discard block
 block discarded – undo
923 923
         // -----------------
924 924
 
925 925
         return [
926
-            [ // CustomHTML
926
+            [// CustomHTML
927 927
                 'name'  => 'select_heading',
928 928
                 'type'  => 'custom_html',
929 929
                 'value' => '<h5 class="mb-0 text-primary">No Relationship</h5>',
930 930
                 'tab'   => 'Selects',
931 931
             ],
932
-            [ // select_from_array
932
+            [// select_from_array
933 933
                 'name'              => 'select_from_array',
934 934
                 'label'             => 'Select_from_array (no relationship, 1-1 or 1-n)',
935 935
                 'type'              => 'select_from_array',
@@ -939,7 +939,7 @@  discard block
 block discarded – undo
939 939
                 'allows_multiple'   => false, // OPTIONAL; needs you to cast this to array in your model;
940 940
                 'wrapperAttributes' => ['class' => 'form-group col-md-6'],
941 941
             ],
942
-            [ // select2_from_array
942
+            [// select2_from_array
943 943
                 'name'              => 'select2_from_array',
944 944
                 'label'             => 'Select2_from_array (no relationship, 1-1 or 1-n)',
945 945
                 'type'              => 'select2_from_array',
@@ -949,7 +949,7 @@  discard block
 block discarded – undo
949 949
                 'allows_multiple'   => false, // OPTIONAL; needs you to cast this to array in your model;
950 950
                 'wrapperAttributes' => ['class' => 'form-group col-md-6'],
951 951
             ],
952
-            [ // select_and_order
952
+            [// select_and_order
953 953
                 'name'    => 'select_and_order',
954 954
                 'label'   => 'Select_and_order',
955 955
                 'type'    => 'select_and_order',
@@ -979,7 +979,7 @@  discard block
 block discarded – undo
979 979
         $fields = [];
980 980
 
981 981
         if (app('env') == 'production') {
982
-            $fields[] = [   // CustomHTML
982
+            $fields[] = [// CustomHTML
983 983
                 'name'      => 'separator',
984 984
                 'type'      => 'custom_html',
985 985
                 'value'     => '<p><small><strong>Note: </strong>In the online demo we\'ve restricted the upload and media library fields a lot, or hidden them entirely. To test them out, you can <a target="_blank" href="https://backpackforlaravel.com/docs/demo">download and install this demo admin panel</a> in your local environment.</small></p>',
@@ -987,14 +987,14 @@  discard block
 block discarded – undo
987 987
             ];
988 988
         }
989 989
 
990
-        $fields[] = [   // Browse
990
+        $fields[] = [// Browse
991 991
             'name'  => 'browse',
992 992
             'label' => 'Browse (using elFinder)',
993 993
             'type'  => 'browse',
994 994
             'tab'   => 'Uploads',
995 995
         ];
996 996
 
997
-        $fields[] = [   // Browse multiple
997
+        $fields[] = [// Browse multiple
998 998
             'name'     => 'browse_multiple',
999 999
             'label'    => 'Browse multiple',
1000 1000
             'type'     => 'browse_multiple',
@@ -1004,7 +1004,7 @@  discard block
 block discarded – undo
1004 1004
             // 'mime_types' => null, // visible mime prefixes; ex. ['image'] or ['application/pdf']
1005 1005
         ];
1006 1006
 
1007
-        $fields[] = [   // Upload
1007
+        $fields[] = [// Upload
1008 1008
             'name'   => 'upload',
1009 1009
             'label'  => 'Upload',
1010 1010
             'type'   => 'upload',
@@ -1015,7 +1015,7 @@  discard block
 block discarded – undo
1015 1015
             'tab' => 'Uploads',
1016 1016
         ];
1017 1017
 
1018
-        $fields[] = [   // Upload
1018
+        $fields[] = [// Upload
1019 1019
             'name'   => 'upload_multiple',
1020 1020
             'label'  => 'Upload Multiple',
1021 1021
             'type'   => 'upload_multiple',
@@ -1026,7 +1026,7 @@  discard block
 block discarded – undo
1026 1026
             'tab' => 'Uploads',
1027 1027
         ];
1028 1028
 
1029
-        $fields[] = [ // base64_image
1029
+        $fields[] = [// base64_image
1030 1030
             'label'        => 'Base64 Image - includes cropping',
1031 1031
             'name'         => 'base64_image',
1032 1032
             'filename'     => null, // set to null if not needed
@@ -1037,7 +1037,7 @@  discard block
 block discarded – undo
1037 1037
             'tab'          => 'Uploads',
1038 1038
         ];
1039 1039
 
1040
-        $fields[] = [ // image
1040
+        $fields[] = [// image
1041 1041
             'label'        => 'Image - includes cropping',
1042 1042
             'name'         => 'image',
1043 1043
             'type'         => 'image',
@@ -1059,32 +1059,32 @@  discard block
 block discarded – undo
1059 1059
         // -----------------
1060 1060
 
1061 1061
         return [
1062
-            [   // SimpleMDE
1062
+            [// SimpleMDE
1063 1063
                 'name'  => 'easymde',
1064 1064
                 'label' => 'EasyMDE - markdown editor (well-maintained fork of SimpleMDE)',
1065 1065
                 'type'  => 'easymde',
1066 1066
                 'tab'   => 'Big texts',
1067 1067
                 'fake'  => true,
1068 1068
             ],
1069
-            [   // Summernote
1069
+            [// Summernote
1070 1070
                 'name'  => 'summernote',
1071 1071
                 'label' => 'Summernote editor',
1072 1072
                 'type'  => 'summernote',
1073 1073
                 'tab'   => 'Big texts',
1074 1074
             ],
1075
-            [   // CKEditor
1075
+            [// CKEditor
1076 1076
                 'name'  => 'wysiwyg',
1077 1077
                 'label' => 'CKEditor - also called the WYSIWYG field',
1078 1078
                 'type'  => 'ckeditor',
1079 1079
                 'tab'   => 'Big texts',
1080 1080
             ],
1081
-            [   // TinyMCE
1081
+            [// TinyMCE
1082 1082
                 'name'  => 'tinymce',
1083 1083
                 'label' => 'TinyMCE',
1084 1084
                 'type'  => 'tinymce',
1085 1085
                 'tab'   => 'Big texts',
1086 1086
             ],
1087
-            [   // SimpleMDE
1087
+            [// SimpleMDE
1088 1088
                 'name'  => 'simplemde',
1089 1089
                 'label' => 'SimpleMDE',
1090 1090
                 'type'  => 'easymde',
@@ -1100,7 +1100,7 @@  discard block
 block discarded – undo
1100 1100
         // -----------------
1101 1101
 
1102 1102
         return [
1103
-            [   // Color
1103
+            [// Color
1104 1104
                 'name'  => 'color',
1105 1105
                 'label' => 'Color picker (HTML5 spec)',
1106 1106
                 'type'  => 'color',
@@ -1108,7 +1108,7 @@  discard block
 block discarded – undo
1108 1108
                 'tab'               => 'Miscellaneous',
1109 1109
                 'wrapperAttributes' => ['class' => 'form-group col-md-6'],
1110 1110
             ],
1111
-            [   // Color
1111
+            [// Color
1112 1112
                 'name'  => 'color_picker',
1113 1113
                 'label' => 'Color picker (jQuery plugin)',
1114 1114
                 'type'  => 'color_picker',
@@ -1116,14 +1116,14 @@  discard block
 block discarded – undo
1116 1116
                 'tab'               => 'Miscellaneous',
1117 1117
                 'wrapperAttributes' => ['class' => 'form-group col-md-6'],
1118 1118
             ],
1119
-            [   // URL
1119
+            [// URL
1120 1120
                 'name'              => 'video',
1121 1121
                 'label'             => 'Video - link to video file on Youtube or Vimeo',
1122 1122
                 'type'              => 'video',
1123 1123
                 'tab'               => 'Miscellaneous',
1124 1124
                 'wrapperAttributes' => ['class' => 'form-group col-md-5'],
1125 1125
             ],
1126
-            [   // Range
1126
+            [// Range
1127 1127
                 'name'  => 'range',
1128 1128
                 'label' => 'Range',
1129 1129
                 'type'  => 'range',
@@ -1143,7 +1143,7 @@  discard block
 block discarded – undo
1143 1143
                 'tab'               => 'Miscellaneous',
1144 1144
                 'wrapperAttributes' => ['class' => 'form-group col-md-2'],
1145 1145
             ],
1146
-            [ // Table
1146
+            [// Table
1147 1147
                 'name'            => 'table',
1148 1148
                 'label'           => 'Table',
1149 1149
                 'type'            => 'table',
@@ -1157,7 +1157,7 @@  discard block
 block discarded – undo
1157 1157
                 'min' => 0, // minimum rows allowed in the table
1158 1158
                 'tab' => 'Miscellaneous',
1159 1159
             ],
1160
-            [ // Table
1160
+            [// Table
1161 1161
                 'name'            => 'fake_table',
1162 1162
                 'label'           => 'Fake Table',
1163 1163
                 'type'            => 'table',
Please login to merge, or discard this patch.