Not to familiar with doing if statement where quires are concerned so looking for some help/advice.
Below is what i have tried (novice alert)
$query = Reviews::find()
->andFilterWhere(['like', 'name', $_POST['Product']['name']])
if(!empty($_POST['Product']['name'])){
->andFilterWhere(['in', 'brand_id', $_POST['Product']['brand_id']])
}
if(!empty($_POST['Product']['name'])){
->andFilterWhere(['in', 'category_id', $_POST['Product']['category_id']])
};