Laravel Eloquent WHERE和AND

I have comment table with id, privacy(0,1,2), comment_body columns

I am using Larvael 4.2.x Eloquent to get the result. What I am trying to get is all the comment with the privacy of 0 and 1 from one user.

What I have tried?

Option 1

$user  = User::find(1);

//query will give me comment for privacy = 0
$comment_for_user = $user->comments()->where('privacy','0');

Option 2

//this wont return anything
$comment_for_user = $user->comments()->where('privacy','0')
                                    ->where('privacy',1);

Option 3

//return the result but gets post form all users 
$comment_for_user = $user->comments()->where('privacy','0')
                                    ->Orwhere('privacy',1);

Thanks you for your help.

You can use whereIn.

$comment_for_user = $user->comments()->whereIn('privacy', array(0, 1))->get();

You can find more useful methods in the documentation.