where('relation_game_id', $params['relation_game_id']); } if (!empty($params['base_game_id'])) { $query->where('base_game_id', $params['base_game_id']); } if (!empty($params['sdk_version'])) { $query->where('sdk_version', $params['sdk_version']); } } }