yii2 en donde en

public function static findProductsOnSale($ids)
{
    return $this->find()->where(['in', 'product_id', $ids])->count();
}
Purple Team