No, you can just preface any where method with 'or', these are built in methods.
For situations like this I prefer using whereRaw.
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Can I use eloquent like this:
$query->where($field, $value)->orWhereIsNull($field)->orWhereNotIn($field, $array)->get();
?
Basically can I preface any advance where function with 'or' and will it still work?
Yes, they do exists and you can use them with Eloquent too.
Please or to participate in this conversation.