How to use OR in matching query?

Hello. i have 3 tables.i want to use some matching OR in my query.but i can’t.i can matchin with and but i don’t know how to use or in matching query.this is my code.

$Find_contests->matching('Designs', function ($q)use ($Id_user)
{
   return $q->Where(['Designs.user_id' => $Id_user]);

}
);
$Find_contests->matching('Invitationscontests', function ($q)use ($Id_user)
{
   return $q->Where(['Invitationscontests.designer_id' => $Id_user]); }
);

it can find by and but i wana find ‘Invitationscontests.designer_id’ => $Id_user or Designs.user_id’ => $Id_user.help me please

1 Like

Did you find a solution?