@@ -45,24 +45,24 @@ public function index(Request $request) : JsonResponse | array
4545 }
4646
4747 if ($ request ->filled ('action_type ' )) {
48- $ actionlogs = $ actionlogs ->where ('action_type ' , '= ' , $ request ->input ('action_type ' ))-> orderBy ( ' created_at ' , ' desc ' ) ;
48+ $ actionlogs = $ actionlogs ->where ('action_type ' , '= ' , $ request ->input ('action_type ' ));
4949 }
5050
5151 if ($ request ->filled ('created_by ' )) {
5252 $ actionlogs = $ actionlogs ->where ('created_by ' , '= ' , $ request ->input ('created_by ' ));
5353 }
5454
5555 if ($ request ->filled ('action_source ' )) {
56- $ actionlogs = $ actionlogs ->where ('action_source ' , '= ' , $ request ->input ('action_source ' ))-> orderBy ( ' created_at ' , ' desc ' ) ;
56+ $ actionlogs = $ actionlogs ->where ('action_source ' , '= ' , $ request ->input ('action_source ' ));
5757 }
5858
5959 if ($ request ->filled ('remote_ip ' )) {
60- $ actionlogs = $ actionlogs ->where ('remote_ip ' , '= ' , $ request ->input ('remote_ip ' ))-> orderBy ( ' created_at ' , ' desc ' ) ;
60+ $ actionlogs = $ actionlogs ->where ('remote_ip ' , '= ' , $ request ->input ('remote_ip ' ));
6161 }
6262
6363
6464 if ($ request ->filled ('uploads ' )) {
65- $ actionlogs = $ actionlogs ->whereNotNull ('filename ' )-> orderBy ( ' created_at ' , ' desc ' ) ;
65+ $ actionlogs = $ actionlogs ->whereNotNull ('filename ' );
6666 }
6767
6868 $ allowed_columns = [
@@ -94,7 +94,7 @@ public function index(Request $request) : JsonResponse | array
9494 $ actionlogs ->OrderByCreatedBy ($ order );
9595 break ;
9696 default :
97- $ sort = in_array ($ request ->input ('sort ' ), $ allowed_columns ) ? e ($ request ->input ('sort ' )) : 'created_at ' ;
97+ $ sort = in_array ($ request ->input ('sort ' ), $ allowed_columns ) ? e ($ request ->input ('sort ' )) : 'action_logs. created_at ' ;
9898 $ actionlogs = $ actionlogs ->orderBy ($ sort , $ order );
9999 break ;
100100 }
0 commit comments