File tree Expand file tree Collapse file tree 1 file changed +11
-5
lines changed
Expand file tree Collapse file tree 1 file changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -33,15 +33,21 @@ public function getMatchAttribute() {
3333 $ reportArr = $ this ->toArray ();
3434 $ match = [];
3535 $ query = isset ($ reportArr ['query ' ]) ? (array ) $ reportArr ['query ' ] : null ;
36- $ actorArray = [];
3736
3837 if (is_array ($ query ) && count ($ query ) > 0 && !isset ($ query [0 ])) {
3938 foreach ($ query as $ key => $ value ) {
4039 if (in_array ($ key , $ this ->actorQuery )) {
41- if (is_array ($ value )) {
42- $ match ['$or ' ][][$ key ] = ['$in ' => $ value ];
43- } else {
44- $ match ['$or ' ][][$ key ] = $ value ;
40+ foreach ($ value as $ actor_id ) {
41+ if (is_object ($ actor_id )) {
42+ $ object_vars = get_object_vars ($ actor_id );
43+ $ filter = [];
44+ foreach ($ object_vars as $ var_key => $ var_val ) {
45+ $ filter [$ key .'. ' .$ var_key ] = $ var_val ;
46+ }
47+ $ match ['$or ' ][] = $ filter ;
48+ } else {
49+ $ match ['$or ' ][][$ key ] = $ actor_id ;
50+ }
4551 }
4652 } else {
4753 if (is_array ($ value )) {
You can’t perform that action at this time.
0 commit comments