@@ -33,7 +33,7 @@ class TicketsController extends Controller
3333 protected $ tickets ;
3434 protected $ member ;
3535 protected $ a_search_fields_numeric = ['creator_id ' , 'user_id ' , 'status_id ' , 'priority_id ' , 'category_id ' , 'agent_id ' ];
36- protected $ a_search_fields_text = ['subject ' , 'content ' , 'intervention ' ];
36+ protected $ a_search_fields_text = ['subject ' , 'html ' , 'intervention_html ' ];
3737
3838 public function __construct (Ticket $ tickets , \PanicHDMember $ member )
3939 {
@@ -112,15 +112,15 @@ public function data($ticketList = 'active')
112112 if (isset ($ search_fields ['any_text_field ' ])){
113113 $ collection ->where (function ($ query ) use ($ search_fields ){
114114 $ query ->where ('subject ' , 'like ' , '% ' . $ search_fields ['any_text_field ' ] . '% ' )
115- ->orWhere ('content ' , 'like ' , '% ' . $ search_fields ['any_text_field ' ] . '% ' )
116- ->orWhere ('intervention ' , 'like ' , '% ' . $ search_fields ['any_text_field ' ] . '% ' )
115+ ->orWhere ('html ' , 'like ' , '% ' . $ search_fields ['any_text_field ' ] . '% ' )
116+ ->orWhere ('intervention_html ' , 'like ' , '% ' . $ search_fields ['any_text_field ' ] . '% ' )
117117 ->orWhereHas ('attachments ' , function ($ q1 ) use ($ search_fields ){
118118 $ q1 ->where ('original_filename ' , 'like ' , '% ' . $ search_fields ['any_text_field ' ] . '% ' )
119119 ->orWhere ('new_filename ' , 'like ' , '% ' . $ search_fields ['any_text_field ' ] . '% ' )
120120 ->orWhere ('description ' , 'like ' , '% ' . $ search_fields ['any_text_field ' ] . '% ' );
121121 })
122122 ->orWhereHas ('comments ' , function ($ q2 ) use ($ search_fields ) {
123- $ q2 ->where ('content ' , 'like ' , '% ' . $ search_fields ['any_text_field ' ] . '% ' )
123+ $ q2 ->where ('html ' , 'like ' , '% ' . $ search_fields ['any_text_field ' ] . '% ' )
124124 ->orWhereHas ('attachments ' , function ($ q3 ) use ($ search_fields ){
125125 $ q3 ->where ('original_filename ' , 'like ' , '% ' . $ search_fields ['any_text_field ' ] . '% ' )
126126 ->orWhere ('new_filename ' , 'like ' , '% ' . $ search_fields ['any_text_field ' ] . '% ' )
0 commit comments