drupal 8 database query or condition not working code example
Example: drupal 8 database query or condition
$orGroup = $query->orConditionGroup()
->condition('promoted', 1)
->condition('uid', [2,4,7,22], 'IN');
// Add the group to the query.
$query->condition($orGroup);