@@ -16,7 +16,7 @@ class MonsterCrudController extends CrudController
16
16
use \Backpack \CRUD \app \Http \Controllers \Operations \ShowOperation;
17
17
use \Backpack \CRUD \app \Http \Controllers \Operations \FetchOperation;
18
18
use \Backpack \Pro \Http \Controllers \Operations \AjaxUploadOperation { ajaxUpload as traitAjaxUpload; }
19
- use \ App \ Http \ Controllers \ Admin \ Operations \SMSOperation; //Custom Form Operation Example
19
+ use Operations \SMSOperation; //Custom Form Operation Example
20
20
use \Backpack \ActivityLog \Http \Controllers \Operations \ModelActivityOperation;
21
21
use \Backpack \ActivityLog \Http \Controllers \Operations \EntryActivityOperation;
22
22
@@ -320,13 +320,6 @@ public function setupShowOperation()
320
320
'tab ' => 'WYSIWYG Editors ' ,
321
321
]);
322
322
323
- $ this ->crud ->addColumn ([
324
- 'name ' => 'wysiwyg ' ,
325
- 'type ' => 'wysiwyg ' ,
326
- 'label ' => 'Wysiwyg ' .backpack_pro_badge (),
327
- 'tab ' => 'WYSIWYG Editors ' ,
328
- ]);
329
-
330
323
$ this ->crud ->addColumn ([
331
324
'name ' => 'features ' ,
332
325
'label ' => 'Features ' .backpack_pro_badge (),
@@ -734,7 +727,7 @@ protected function addCustomCrudFilters()
734
727
],
735
728
false , // the simple filter has no values, just the "Draft" label specified above
736
729
function () { // if the filter is active (the GET parameter "draft" exits)
737
- $ this ->crud ->addClause ('where ' , 'checkbox ' , '1 ' );
730
+ $ this ->crud ->addClause ('where ' , 'checkbox ' , '1 ' );
738
731
}
739
732
);
740
733
@@ -755,7 +748,7 @@ function () { // if the filter is active (the GET parameter "draft" exits)
755
748
],
756
749
false ,
757
750
function ($ value ) { // if the filter is active
758
- $ this ->crud ->addClause ('where ' , 'text ' , 'LIKE ' , "% $ value% " );
751
+ $ this ->crud ->addClause ('where ' , 'text ' , 'LIKE ' , "% $ value% " );
759
752
}
760
753
);
761
754
@@ -769,7 +762,7 @@ function ($value) { // if the filter is active
769
762
],
770
763
false ,
771
764
function ($ value ) { // if the filter is active
772
- $ range = json_decode ($ value );
765
+ $ range = json_decode ($ value );
773
766
if ($ range ->from && $ range ->to ) {
774
767
$ this ->crud ->addClause ('where ' , 'number ' , '>= ' , (float ) $ range ->from );
775
768
$ this ->crud ->addClause ('where ' , 'number ' , '<= ' , (float ) $ range ->to );
@@ -785,7 +778,7 @@ function ($value) { // if the filter is active
785
778
],
786
779
false ,
787
780
function ($ value ) { // if the filter is active, apply these constraints
788
- $ this ->crud ->addClause ('where ' , 'date ' , '= ' , $ value );
781
+ $ this ->crud ->addClause ('where ' , 'date ' , '= ' , $ value );
789
782
}
790
783
);
791
784
@@ -803,7 +796,7 @@ function ($value) { // if the filter is active, apply these constraints
803
796
],
804
797
false ,
805
798
function ($ value ) { // if the filter is active, apply these constraints
806
- $ dates = json_decode ($ value );
799
+ $ dates = json_decode ($ value );
807
800
$ this ->crud ->addClause ('where ' , 'date ' , '>= ' , $ dates ->from );
808
801
$ this ->crud ->addClause ('where ' , 'date ' , '<= ' , $ dates ->to );
809
802
}
@@ -816,7 +809,7 @@ function ($value) { // if the filter is active, apply these constraints
816
809
], function () {
817
810
return \Backpack \NewsCRUD \app \Models \Category::all ()->keyBy ('id ' )->pluck ('name ' , 'id ' )->toArray ();
818
811
}, function ($ value ) { // if the filter is active
819
- $ this ->crud ->addClause ('where ' , 'select2 ' , $ value );
812
+ $ this ->crud ->addClause ('where ' , 'select2 ' , $ value );
820
813
});
821
814
822
815
$ this ->crud ->addFilter ([ // select2_multiple filter
@@ -826,9 +819,9 @@ function ($value) { // if the filter is active, apply these constraints
826
819
], function () {
827
820
return \Backpack \NewsCRUD \app \Models \Category::all ()->keyBy ('id ' )->pluck ('name ' , 'id ' )->toArray ();
828
821
}, function ($ values ) { // if the filter is active
829
- foreach (json_decode ($ values ) as $ key => $ value ) {
830
- $ this ->crud ->addClause ('orWhere ' , 'select2 ' , $ value );
831
- }
822
+ foreach (json_decode ($ values ) as $ key => $ value ) {
823
+ $ this ->crud ->addClause ('orWhere ' , 'select2 ' , $ value );
824
+ }
832
825
});
833
826
834
827
$ this ->crud ->addFilter (
@@ -841,7 +834,7 @@ function ($value) { // if the filter is active, apply these constraints
841
834
],
842
835
url ('api/article-search ' ), // the ajax route
843
836
function ($ value ) { // if the filter is active
844
- $ this ->crud ->addClause ('where ' , 'select2_from_ajax ' , $ value );
837
+ $ this ->crud ->addClause ('where ' , 'select2_from_ajax ' , $ value );
845
838
}
846
839
);
847
840
}
@@ -1721,12 +1714,6 @@ public static function getFieldsArrayForWysiwygEditorsTab()
1721
1714
'type ' => 'tinymce ' ,
1722
1715
'tab ' => 'WYSIWYG Editors ' ,
1723
1716
],
1724
- [ // Wysiwyg
1725
- 'name ' => 'wysiwyg ' ,
1726
- 'label ' => 'Wysiwyg ' .backpack_pro_badge (),
1727
- 'type ' => 'wysiwyg ' ,
1728
- 'tab ' => 'WYSIWYG Editors ' ,
1729
- ],
1730
1717
];
1731
1718
}
1732
1719
0 commit comments